Hi everyone
I’m creating a MySQL-driven Flash site, and I use PHP to get the data out of the database and to parse it into XML which Flash can read easily. However, in MySQL, if I want to add <**br> tags to have them displayed in Flash, PHP reads them as HTML, and messes up the XML that way.
I have fixed that problem by using str_replace to replace all <'s by &**lt; and all the >'s by &**gt; This works, and PHP now outputs the <**br> tags as text, and doesn’t render it as HTML anymore.
However, when I import this XML into Flash, Flash doesn’t seem to read it as the text <**br>, but as &**lt;br&**gt; ,and thus displays the tags in the textfield instead of rendering them. I have tried all sorts of things such as toString(), but they didn’t work. So I guess what I need is for PHP to output <**br>, and not have it output &**lt;br&**gt; which is then rendered as < and > in the XML file.
Also, what would be handy is that I wouldn’t have to use br tags in MySQL at all, that they would be automatically converted to br tags by PHP.
Can anyone help me ?