How do I write this foreach loop as any other kind of loop?
foreach ($a as $b)
{
do function开发者_如何学运维
}
while ($b.MoveNext())
{
$a = $b.Current;
}
reset($a);
while (list($key, $value) = each($a)) {
//...
}
$keys = array_keys($a);
while (($key = array_shift($keys)) !== NULL))
{
$b = $a[$key];
}
$i = 0;
while ($i < count($a))
{
$b = $a[$i];
//do function
$i++;
}
精彩评论