Web Analytics

PHP array_unshift() Function

ArrayPHP 4+

The array_unshift() function adds one or more elements to the beginning of an array, shifting existing elements up.

Syntax

array_unshift(array &$array, mixed ...$values): int

Try It Online

Output
Click Run to execute your code