March 2002
Intermediate to advanced
528 pages
21h 29m
English
array_pad
array array_pad(arrayinput, intsize[, mixedpadding])
Returns a copy of the input array padded to the length specified by
size. Any new elements added to the array
have the value of the optional third value. You can add elements to
the beginning of the array by specifying a negative size—in
this case, the new size of the array is the absolute value of the
size.
If the array already has the specified number of elements or more, no padding takes place and an exact copy of the original array is returned.