编辑:
该死的对不起,它是正确的,我不得不尝试,但它对我来说听起来不太好,无论如何谢谢xD
我正在尝试创建一个循环并同时从中调用:
$xml = simplexml_load_file('xml.xml');
$cats = ('Cat2','Cat2');
foreach($cats as $cat){
$call1 = $xml->$cat;
// it supposed to get all cats contents .. now i want to call what is inside the cat
foreach($call1 as $call2){
$call = $call2->somethingelse;
}
}
这怎么可能?