Page is a not externally linkable
ericlewis107 - 11:25 am on Dec 7, 2012 (gmt 0)
array_values($arr) function accepts a PHP array and returns a new array containing only its values (not its keys). Its counterpart is the array_keys() function. Use this function to retrieve all the values from an associative array.
Code:
$data = array("hero" => "Holmes", "villain" => "Moriarty");
print_r(array_values($data));
?>
Output:
Array
(
[0] => Holmes
[1] => Moriarty
)