hi i have three array like this
$arr1 = array(2,3,4,5);
$arr2 = array(1,2,3,4);
$arr3 = array();
i need a loop function to duplicate each of the value inside $arr2 with the value inside $arr1 so the end result should look like this:
$arr3= array(1,1,2,2,2,3,3,3,3,4,4,4,4,4,4);
i know that i need to do an array_push into the $arr3 with $arr2[i] by doing this
for($i=0;$i < count($arr2);$++){
array_push($arr3,$arr2[$i]);
}
but i dont know the outer loop for iterating the array_push loop, what should i add to do the duplicating?