Array in key/value pairs using each



examples/intro/array_each.php
<?php

$a = array('two' => 2, 'one' => 1, 'three' => 3);
while (list($key, $value) = each($a)) {
    print "$key   $value\n";
}
?>