Definition
The array_values() function returns an array containing all the values of an array. The returned array will be indexed numerically, starting with 0 and increase each time by 1.
Syntax
array_values(array)
Parameters
Parameter | Description |
---|---|
array |
Required. Specifying an array. |
Example
<?php
$ages = array("Mark" => 22, "Jeff" => 32, "Mike" => 28);
print_r(array_values($ages));