PHP Array Push Array

Advertisement

PHP Array Push Array: This tutorial exemplifies the array_push() function. In this page we have discussed about array push array i.e. whenever we push an array into another array then the first array becomes multidimensional array.

PHP Array Push Array

In this tutorial we will study about pushing one array into another instead
of pushing one element or value, to implement this we need to use array_push
function. After pushing one array into another the first array becomes
multi-dimensional array. Example will illustrate this point.

array_push() is one of the widely used function to add item into an array.
General format, parameters it take and type of value it returns is as follows: