Forum Moderators: coopster

Message Too Old, No Replies

Including an Image.

         

mhoctober

1:44 am on Jan 1, 2006 (gmt 0)

10+ Year Member



All...

I am attempting to write this echo statement that paints an image in HTML code...

echo "<img src="/_borders/logoa.gif">";

and of course am encountering issues with the quotes around the file reference.

Any ideas for a quick reliable fix?

Many thanks....

koen

2:31 am on Jan 1, 2006 (gmt 0)

10+ Year Member



special characters should be escaped by a "\". Another solution with the double use of quotes is to use " ' ' " or ' " " '.

jatar_k

6:02 am on Jan 1, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



as koen mentioned

escaped
echo "<img src=\"/_borders/logoa.gif\">";

or single quoted
echo '<img src="/_borders/logoa.gif">';

or use single quotes inside
echo "<img src='/_borders/logoa.gif'>";

reference
[php.net...]

mhoctober

10:55 am on Jan 1, 2006 (gmt 0)

10+ Year Member



txs guys. All working well!