Merge Two array without function in php
<?php
$array1 = array(1,2,3,4,5);
$array2 = array(6,7,8,9,10);
for($i=0;$i<count($array2);$i++){
$array1[] = $array2[$i];
}
echo"<pre>";
print_r($array1);
?>
Output:-
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 )
Comments
Post a Comment