update page now
PHP 8.1.34 Released!

Voting

: min(four, eight)?
(Example: nine)

The Note You're Voting On

nino dot skopac at gmail dot com
10 years ago
<?php
function each_v2($arr) {
    // same as each() but when it hits end of array, it resets it
    static $i = 0;
    
    if (isset($arr[$i])) {
        // exists¸
        return $arr[$i++];
    } else {
        // reset $i to 0 and repeat
        $i = 0;
        return each_v2($arr);
    }
}
?>

<< Back to user notes page

To Top