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/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: ow can I get the unique nodeNames into an array? (/showthread.php?tid=72901)



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.