<?php
$a = array_fill(5, 6, 'banana');
print_r($a);
echo "<br>";
$a = $a+array_fill(11, 6, 'cocos');
print_r($a);
?>
Array ( [5] => banana [6] => banana [7] => banana [8] => banana [9] => banana [10] => banana )
Array ( [5] => banana [6] => banana [7] => banana [8] => banana [9] => banana [10] => banana [11] => cocos [12] => cocos [13] => cocos [14] => cocos [15] => cocos [16] => cocos )
No hay comentarios:
Publicar un comentario