Re: simplexml

From: Date: Thu, 10 Jul 2008 16:57:23 +0000
Subject: Re: simplexml
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-276610@lists.php.net to get a copy of this message
You have to handle the html special chars. & == &amp; On Thu, Jul 10, 2008 at 10:59 AM, Joakim Ling <jocke@deep.co.uk> wrote: > Hi > > > > I'm using simplexml to create some xml files. > > Here's a stripped example, how can I get this to work? Tried millions > different ways still no joy. > > > > <?php > > header("Content-type: text/xml"); > > > > $xml = simplexml_load_string('<root></root>'); > > $root = $xml->addChild('tests'); > > $root->addChild('test', 'test & test'); > > > > echo $xml->asXML(); > > ?> > > > > // cheers jo > >

« previous php.general (#276610) next »