array_unshift

PHP 4, PHP 5, PHP 7, PHP 8
array_unshift - Prepend one or more elements to the beginning of an array

Example #1 array_unshift example

Result: Array ( [0] => apple [1] => raspberry [2] => orange [3] => banana )
PHP Version:


Function array_unshift:

Arrays Functions

Most used PHP functions