php - array_values

Description

array array_values ( array $input )
array_values() returns all the values from the input array and indexes numerically the array.

Example 284. array_values() example
<?php

$array
= array("size" => "XL", "color" => "gold");

print_r(array_values($array));

?>
  The above example will output:
Array
(
[0] => XL
[1] => gold
)

No comments:

Post a Comment