Copyright © tutorialspoint.com
| array_values ( $array ); |
This function returns all the values from the input array and indexes numerically the array.
| Parameter | Description |
|---|---|
| array | Required. Specifies an array. |
Try out following example:
<?php
$array = array("a"=>"green", "b"=>"brown", "c"=>"blue", "red");
print_r(array_values($array));
?>
|
This will produce following result:
Array
(
[0] => green
[1] => brown
[2] => blue
[3] => red
)
|
Copyright © tutorialspoint.com