Re: XML. Prevent < from turning into <
| From: | Bastien Koert | Date: | Wed, 09 Sep 2009 13:26:42 +0000 |
| Subject: | Re: XML. Prevent < from turning into < | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297811@lists.php.net to get a copy of this message | ||
On Wed, Sep 9, 2009 at 5:27 AM, Matthew Croud<matt@obviousdigital.com> wrote:
>
> Hiya,
> I'm writing an app that let's my client upload images, the image html code
> is added to an XML file.
> Take a look at the <image> element below:
>
> <item Code="e1022">
> <code>e1022</code>
> <image><![CDATA[<img src="uploads/image2.jpg" alt="Homepage
> Image"
> width="124" height="70" />]]></image>
> <name>Blue Ski Trousers</name>
> <price>8.99</price>
> </item>
>
> Now, whenever PHP writes this to the XML files, it turns the < and > into
> < and > . which means it does not display on the webpage. How can I
> prevent this from happening ?
>
> Many thanks,
> Matt
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
str_replace?
--
Bastien
Cat, the other other white meat