I'm just getting my head around parsing XML from PHP with SimpleXML and using something I don't fully understand.
I kinda understand what the "->" is for - an equivalent of "." in Blitzmax I guess you'd call it, but it does feel a bit cumbersome. Is there another, cleaner-looking way of achieving the same result?
Or am I just doing it completely wrong (it *does* work, though!)?
$xml = simplexml_load_file('myfile.xml'); foreach ($xml->TopLevel->NextLevel->AnotherLevel as $result) { echo $result->Field1; }
I kinda understand what the "->" is for - an equivalent of "." in Blitzmax I guess you'd call it, but it does feel a bit cumbersome. Is there another, cleaner-looking way of achieving the same result?
Or am I just doing it completely wrong (it *does* work, though!)?