← All built-ins / array_values()

array_values()

array_values(array $a): mixed

Parameters

NameTypeDescription
$aarrayinput array

Return value

List of all values, freshly indexed 0..n-1.

Example

echo implode(",", array_values([5 => "a", 9 => "b"]));
a,b

See also

array_keys()array_unique()