# BR Tags from MySQL via PHP to Flash

**URL:** <https://forum.kirupa.com/t/br-tags-from-mysql-via-php-to-flash/100538>\
**Category:** Uncategorized\
**Created:** [January 30, 2004, 8:10pm UTC](https://forum.kirupa.com/t/br-tags-from-mysql-via-php-to-flash/100538 "2004-01-30T20:10:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voetsjoeba](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Voetsjoeba](https://forum.kirupa.com/u/Voetsjoeba)\
**Post date:** [January 30, 2004, 8:10pm UTC](https://forum.kirupa.com/t/br-tags-from-mysql-via-php-to-flash/100538/1 "2004-01-30T20:10:29Z")

</div>

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 ?
