Mega Code Archive

 
Categories / Php / XML
 

Parsing XML in a string

$channel =<<<_XML_ <channel>  <title>What's For Dinner</title>  <link>http://menu.example.com/</link>  <description>what to eat tonight.</description> </channel> _XML_; $xml = simplexml_load_string($channel);