Return all the values of an array, excluding the keys.
<?php $a=array(“Name”=>“Peter”,“Age”=>“41”,“Country”=>“USA”); print_r(array_values($a)); ?> |
The array_values()
function returns an array containing all the values from the input array.
Tip: The returned array will have numeric keys, starting at 0 and incrementing by 1.
array_values(array) |
Parameter |
Description |
array |
Required. Specifying an array |
Return Value: |
Returns an array containing all the values of an array |
PHP Version: |
4+ |