Still having problem with array of arrays. Here is the code:
echo("Name:
".$res["XMLTREE"]["DATAS"][0]["MODELE"]["0"]["MODELNAME"]."<br>");
//$res["XMLTREE"]["DATAS"][0]["MODELE"] is an array with many MODELNAME
while(list($k,$v) = each($res["XMLTREE"]["DATAS"][0]["MODELE"])){
echo("Name: ".$res[$k]["0"]["MODELNAME"]."<br>");
While the first line (the echo) works fine, the echo in the "while" doesn't
work.
I've already created a function by passing such reference:
function printtree($array, $level){
while(list($k,$v) = each($array)){
if(is_array($array[$k])){ //go into the array and print elements
print("$k -><br>");
$level++;
printtree($array[$k],$level);
}
else
print("$k : $v<br>");
}
}
this works just fine !!!!
Get crazy....
BoB