PHP 8.4.24 Released!

Voting

: max(zero, zero)?
(Example: nine)

The Note You're Voting On

Anonymous
21 years ago
This function will save the key values of an array, and it will work in lower versions of PHP:

<?php

function array_shift2(&$array){
    reset($array);
    $key = key($array);
    $removed = $array[$key];
    unset($array[$key]);
    return $removed;
}

?>

<< Back to user notes page

To Top