For a faster and less "memory eating" php code...
...is it faster to have 3 foreach commands in a row or better to have one foreach command and then separately have 3 others which are pointing to the value I want in xml?

For example (because I think you didn't understand anything from the way I described my problem )

I am trying to parse some xml values into normal php variables. the way I do it is
Code:
for($i=0; $i<sizeof($xml->weeklytrackchart->track); $i++){
foreach($xml -> weeklytrackchart -> track[$i] -> artist as $artist[$i]);
foreach($xml -> weeklytrackchart -> track[$i] -> name as $name[$i]);
foreach($xml -> weeklytrackchart -> track[$i] -> playcount as $playcount[$i]);
would it be better to have in a loop one foreach like
Code:
foreach($xml -> weeklytrackchart -> track[$i] as $path);
and then do something like
Code:
$path->artist[$i];
Code:
$path->name[$i];
Code:
$path->playcount[$i];
or there is a more efficient way?