31special Posted July 21, 2009 Share Posted July 21, 2009 I'm trying to parse the contents of xml tag <g:location> into 4 different elements of an array. Example XML Tag: <g:location><![CDATA[Fort Meade]]>, <![CDATA[MD]]> <![CDATA[20755-6779]]> <![CDATA[united States]]></g:location> Array Example: $my_location= array( 'city' => array('<g:location><![CDATA[', ']]></g:location>'), 'state' => array('<g:location><![CDATA[', ']]></g:location>'), 'zipcode' => array('<g:location><![CDATA[', ']]></g:location>'), 'country' => array('<g:location><![CDATA[', ']]></g:location>'), ) ; What is the proper way to put the <g:location> tag into those 4 different elements? Link to comment https://forums.phpfreaks.com/topic/166733-parsing-xml-cdata/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.