mattspriggs28 Posted August 17, 2009 Share Posted August 17, 2009 Hi all, I have the following xml string that I would like to split into an array: <z:row origin_postcode="PE235LP" destination_postcode="PE216EU" distance="14.35" id="86" description="This is a description here" /> Now, I can easily split this string by each occurence of a space to get each element, but how can I do this without splitting the string when spaces occur within the description element??? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 17, 2009 Share Posted August 17, 2009 simpleXML would probably be your best bet. You can use the SimpleXMLElement::attributes method. Quote Link to comment Share on other sites More sharing options...
DarkendSoul Posted August 17, 2009 Share Posted August 17, 2009 Nuu GingerRoot stole one from me! >: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.