PHP array_pad() Function
The array_pad() function is used to padding (insert) a specified number of elements, with a specified value, into an array. Tip: If you assign a negative size parameter, the function will insert new elements BEFORE the original elements (See example…