update page now

Voting

: four minus three?
(Example: nine)

The Note You're Voting On

soapergem at gmail dot com
16 years ago
Here's a slight revision to xmlich02's backwards iteration example. The problem with his/her example is that it will halt if any of the array elements are boolean false, while this version will not.

<?php

end($ar);
while ( !is_null($key = key($ar)) ) {
    $val = current($ar);
    echo "{$key} => {$val}\n";
    prev($ar);
}

?>

<< Back to user notes page

To Top