September 2001
Intermediate to advanced
768 pages
32h 45m
English
array array_pad(array array, int pad_size, mixed pad_value)
| array | Array to pad |
| pad_size | Number of elements in resulting array |
| pad_value | Value to give to added elements |
Pads an array with a specified number of elements with a given value.
Returns:
Original array, possibly padded to a greater number of elements; NULL on failure
Description:
This function pads the array passed in array with elements having the value given in pad_value until it contains the number of elements given by the absolute value of pad_size . If pad_size is positive, the new elements are added to the end of array . If pad_size is negative, the new elements are added to the beginning. If the absolute value of pad_size is equal to or less than the number of ...
Read now
Unlock full access