Answers for "simplexml_load_string alternative php"

PHP
0

simplexml_load_string alternative php

$LoadXML = file_get_contents("xmldoc.xml");
$xml = simplexml_load_string($LoadXML);
foreach($xml->xml->user as $entry)
{
    $ID = $entry->id;
    $name = $entry->name;
    $age = $entry->age;
}
for($x=0; $x!=count($entry)-1; $x++)
{
echo $ID[$x]."\n";
echo $name[$x]."\n";
echo $age[$x]."\n";
}
Posted by: Guest on March-16-2022

Code answers related to "simplexml_load_string alternative php"

Browse Popular Code Answers by Language