Answers for "xml dom document get attribute value php"

PHP
0

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'];
Posted by: Guest on April-17-2021

Code answers related to "xml dom document get attribute value php"

Browse Popular Code Answers by Language