I've got this as XML:
...
<product>
<id>1</id>
<defaultImage>test.jpg</defaultImage>
</product>
...
I've got this as php:
$testcase = 'defaultimage';
$xml = simplexml_load_file('./temp/'.$i.'.xml');
foreach ($xml->children() as $child) {
$child->$testcase;
}
Now the problem is this, I'm forced to have $testcase
in a lowercase form (defaultimage) BUT in the XML file the name of the child is: defaultImage
(note the uppercase I)
Question: How can I handle all the children as lowercases?