Jump to content

[SOLVED] "echo"ing a variable with HTML inside. Resulting in losing my mind.


kyushudan

Recommended Posts

This text(HTML) resides in a field in a MYSQL dbase:

<img src=&#34;map_pix/Akashi.jpg&#34; width=&#34;200px&#34; height=&#34;100px&#34; alt=&#34;Akashi Castle&#34;>

 

I fetch it then echo it thus:

echo $row['image']. "<br />";

 

The rendered HTML (as it appears in Firefox 3.0):

<img src="map_pix/Akashi.jpg" width="200px" height="100px" alt="Akashi Castle">

 

I check the source, it reads:

<img src=&#34;map_pix/Akashi.jpg&#34; width=&#34;200px&#34; height=&#34;100px&#34; alt=&#34;Akashi Castle&#34;>

 

I can see why but How do I make it executable code? ??? ?

 

Even more confusing is that:

<img src=&#34;map_pix/Akashi.jpg&#34; width=&#34;200px&#34; height=&#34;100px&#34; alt=&#34;Akashi Castle&#34;>

works fine when convert the MYSQL contents into an XML file that is read by a google map. But hey, that's not the problem.

 

 

Apologies if I've posted in the wrong place; php? mysql? html? wasn't sure

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.