Array( [name] => Array ( [0] => 2.png [1] => 3.png [2] => 4.png ) [type] => Array ( [0] => image/png [1] => image/png [2] => image/png ) [tmp_name] => Array ( [0] => E:\phpstudy\tmp\tmp\phpDE5B.tmp [1] => E:\phpstudy\tmp\tmp\phpDE5C.tmp [2] => E:\phpstudy\tmp\tmp\phpDE5D.tmp ) [error] => Array ( [0] => 0 [1] => 0 [2] => 0 ) [size] => Array ( [0] => 10731 [1] => 9123 [2] => 27612 ))
Assuming that this two-dimensional array is called F, I want to iterate over the array while f['name']['0']
assigning to a variable, while assigning f['tmp_name']['0']
to a variable, two times the assignment at the same time, how can I get
Reply content:
Array( [name] => Array ( [0] => 2.png [1] => 3.png [2] => 4.png ) [type] => Array ( [0] => image/png [1] => image/png [2] => image/png ) [tmp_name] => Array ( [0] => E:\phpstudy\tmp\tmp\phpDE5B.tmp [1] => E:\phpstudy\tmp\tmp\phpDE5C.tmp [2] => E:\phpstudy\tmp\tmp\phpDE5D.tmp ) [error] => Array ( [0] => 0 [1] => 0 [2] => 0 ) [size] => Array ( [0] => 10731 [1] => 9123 [2] => 27612 ))
Assuming that this two-dimensional array is called F, I want to iterate over the array while f['name']['0']
assigning to a variable, while assigning f['tmp_name']['0']
to a variable, two times the assignment at the same time, how can I get
for ($i = 0; $i < 3; + + $i) {
$first = $f['name'][$i];$second = $f['tmp_name'][$i];...
}