not that anyone asked or anything.... but still
| From: | Nicolae Doca | Date: | Fri, 06 Oct 2000 10:30:20 +0000 |
| Subject: | not that anyone asked or anything.... but still | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2992@lists.php.net to get a copy of this message | ||
Versions of array_push and array_pop under PHP3, in case someone still use
it, like I do. :)
1)
function sim_array_pop(&$arr)
{
end($arr);
list($key,$val) = each($arr);
unset($arr[$key]);
return $val;
}
2) function sim_array_push(&$arr,$var)
{
$arr[] = $new_element;
return count($arr);
}