PYTHON array_values

is this article helpful?
|
Python replacement for PHP's array_values [ edit | history ]
myDict.values()

PHP array_values

PHP original manual for array_values [ show | php.net ]

array_values

(PHP 4, PHP 5)

array_valuesReturn all the values of an array

Description

array array_values ( array $input )

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

Parameters

input

The array.

Return Values

Returns an indexed array of values.

Examples

Example #1 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
)

See Also