how to get attribute value in xml using php code example
Example: how to get attribute value in xml using php
$xml=simplexml_load_file($file);
foreach($xml->Var[0]->attributes() as $a => $b) {
echo $a,'="',$b,"\"\n";
}
$attr = $xml->Var[0]->attributes();
echo $attr['my_var'];