how correct read array was from xml with json convert in php array?
<php?
$xmlfile = file_get_contents('data.xml');
$ob= simplexml_load_string($xmlfile);
$json = json_encode($ob);
$configData = json_decode($json, true);
foreach($configData["id"] as $configData)
{
echo $configData["name"];
echo $configData["image"];
echo $configData["id"];
}
?>
Warning: Invalid argument supplied for foreach in /data.php on line 10