Setting an Array's Size: array array_pad(array $input, int $size, mixed $value)
<?php
$birds = array('a', 'b', 'c', 'd');
$more_birds = array_pad($birds, 6, 'some bird');
printf("Birds:%s", var_export($birds, TRUE));
printf("More birds:%s", var_export($more_birds, TRUE));
?>
Related examples in the same category