(PHP 4 >= 4.0.0)
array_values -- Return all the values of an arrayarray_values() returns all the values from the input array.
Example 1. array_values() example
This will output:
|
Note: This function was added to PHP 4, below is an implementation for those still using PHP 3.
Example 2. Implementation of array_values() for PHP 3 users
function array_values ($arr) { $t = array(); while (list($k, $v) = each ($arr)) { $t[] = $v; } return $t; }
See also array_keys().