array_values
Return all values in the array
array_values()
function returns an array containing all key values in a given array, but does not retain the key names.
Tip: The returned array will use a numeric key, starting from 0 and incrementing by 1.
Returns all values of the array (non-key names):
<?php $a = array ( "Name" => "Bill" , "Age" => "60" , "Country" => "USA" ) ; print_r ( array_values ( $a ) ) ; ?>
Try it yourself
array_values ( array )
parameter | describe |
---|---|
array | Required. Specify array. |