Method: a::fill
Fills an array up with additional elements to certain amount.
Info
Syntax
a::fill($array, $limit, $fill='placeholder')
Parameters
- $array (array) The source array
- $limit (int) The number of elements the array should contain after filling it up.
- $fill (mixed) The element, which should be used to fill the array
Return (array)
The filled-up result array
Example
$array = array(
'cat',
'dog',
'bird',
);
$result = a::fill($array, 5, 'elephant');
// result: array(
// 'cat',
// 'dog',
// 'bird',
// 'elephant',
// 'elephant',
// );