Onetwothree is an array. If you put the following numbers in the array, place the last 10 numbers to 1.
One two three is an array. If you put the following numbers in the array, put the last 10 numbers into 1.
Reply content:
One two three is an array. If you put the following numbers in the array, put the last 10 numbers into 1.
What do you want to express?
That's a two-dimensional array.
You mean to change $ array_1
$array_1 = array{ 'one' => array('1','2','3','10'), 'two' => array('4','5','6'), 'three' => array('7','8','9')};
?
$j = 0;$array_3 = $array_1;for($i=0;$i
$array_1 = ["one", "two", "three"];$array_2 = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];$tmp = array();for($i = 0, $j = 0; $i < count($array_2); $i++) { if($i % 3 == 0 && $i != 0) $j++; if(count($array_1) == $j) $j = 0; $tmp[$array_1[$j]][] = $array_2[$i];}