(PHP 4, PHP 5, PHP 7)
array_values — Return all the values of an array
$array
)
array_values() returns all the values from the
array
and indexes the array numerically.
array
The array.
Returns an indexed array of values.
Example #1 array_values() example
<?php
$array = array("size" => "XL", "color" => "gold");
print_r(array_values($array));
?>
Exemplul de mai sus va afișa:
Array ( [0] => XL [1] => gold )