Hey All,
This should be pretty easy, but I am just a bit new to this part of the game.. :) I have a simple xml file that I am loading and using to load different page content (I get the XML file from others in our group pre-filled). Anyway, I wrote the following:
<?php
$xml = simplexml_load_file("info.xml");
$xmlarray = array();
foreach($xml->children() as $child)
{
$xmlarray[] = $child;
}
?>
This works fine, but now it has come up that I need to check the field names, as we can have slight variations due to # of bullets needed/etc...
I assume the easiest way to handle this would be to also assign the xml field names as keys into the array and then check against that in php. This is where I am stuck, trying to grab those field names. Ultimately the array values would be something like:
$xmlarray('field1' => 'value')
am I on the right track here? Any help is appreciated.