CodeIgniter Forums
ow can I get the unique nodeNames into an array? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Best Practices (https://forum.codeigniter.com/forum-12.html)
+--- Thread: ow can I get the unique nodeNames into an array? (/thread-72901.html)



ow can I get the unique nodeNames into an array? - yexaacs - 02-26-2019

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") ?


RE: ow can I get the unique nodeNames into an array? - InsiteFX - 02-27-2019

PHP.NET - xml_parse_into_struct

Google is your friend.