22. PHP Array Functions-9 | array_pad and array_pop | ATIBlog

preview_player
Показать описание
PHP Array Functions tutorial in hindi for beginners array_pad and array_pop by ATIBlog

array_pad ( $array, $pad_size, $pad_value );
array_pop ( $array );

1. array_pad()
This function is same like array_fill to fill values but it is used to fill values in an array, and makes the array as a defined size.
This function pads the given pad_value into the array and makes the size of the array as pad_size.
It returns the resulting padded array.
All the three parameters are required in this function.

This function is used to shorten the array by one value. It pops the array.
This function returns the last element of the array.
The resulting array is shortened.
It requires only one parameter, that is the array we need to pop.
Рекомендации по теме
visit shbcf.ru