PHP array_unshift() function
The array_unshift( ) function is an inbuilt function of PHP. It is used to add one or more elements to the beginning of an array. This function was introduced in PHP 4.0.
The array_unshift( ) function returns the new number of elements in the array.
All numerical array keys will be modified to start counting from zero while literal keys won't be changed.
1 2 3 java t point
Array (  =>sachin  =>sehwag  =>harbhajan  =>virat  =>rohit  =>pandeya )
Array (  =>leneovo  =>acer  => dell  =>hp)
Array (  =>pune  =>kolkata  =>bangalore  =>delhi )
Next TopicPHP Array Functions