CodeIgniter Forums

Full Version: ow can I get the unique nodeNames into an array?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have an XML like this in my Codeigniter project


Code:
<myitems>
 <myitem>
   <myname>Some Name</myname>
   <myphone>4444444</myphone>
 </myitem>
 <myitem>
   <myname>Some other Name</myname>
   <myphone>8888888</myphone>
 </myitem>
</myitems>

How can I get the unique nodeNames into an array, like array("myname","myphone") ?
PHP.NET - xml_parse_into_struct

Google is your friend.