I have an XML document and i'm using SimpleXMLElement to parse it with PHP like :
<Document>
<Hello>
<Name>Jason</Name>
</Hello>
</Document>
Example to access to the name loading my XML and then i do :
$xml->Document->Hello->Name
I would like to store all this routes in associative array like
$array = [
"Document->Hello->Name" => "name"
];
The problem is when i loop on this array my field is empty I do this :
foreach($array as $key => $v)
{
$hereIsempty = $xml->$key
}
Is someone have a solution to get the value i want from my array mapping plz