Hello guys,
I have a problem displaying links on a text area. Precisely this link: [url]http://www.amazon.com/Building-iPhone-Apps-HTML-JavaScript/dp/0596805780/ref=sr_1_1?ie=UTF8&s=books&qid=1276205263&sr=1-1
I store that link on my database. When I retrieve it I print it in the following way:
[code=php]
echo” <script type=’text/javascript’>
document.getElementById(‘description’).innerHTML='”.$row[0][‘Description’].”‘;
</script>
“;
The link is not displayed at all, the text area appears blank. I tried using htmlentities and htmlspecialchars but all this does is print it as html, so I can see it on the source code but not as actual text on the web page.
I’m guessing I need to escape some characters to get this working (I think it’s the ‘&’) but I don’t know if there is an easy way to do this.
Any ideas?
Thanks!