PHP array_values() Function

PHP array_values() Function

The array_values () function in PHP returns all the values from the array and indexes the array numerically.

Syntax

Parameter

array(required)– This array represents the input array.

Return

This function returns an indexed array of values.

Example 1

Output

Example 2

Output

Example 3

Output

Example 4

Output