PHP array_values() Function
Complete PHP Array Reference Manual
Example
Return all the values of an array (keys are not preserved):
"Peter","Age"=>"41","Country"=>"USA"); print_r(array_values($a)); ?>Run Example »
Definition and Usage
The array_values() function returns an array containing all the values of an array.
**Tip:** The returned array will use numeric keys starting at 0 and increasing by 1.
Syntax
array_values(
array
)
| Parameters | Description |
|---|---|
| array | Required. Specifies the array. |
Technical Details
| Return Value: | Returns an array containing all the values of the array. |
|---|---|
| PHP Version: | 4+ |
Complete PHP Array Reference Manual