I am trying to use this code:
for ($x = 0; $x < $numCol; $x++) { for ($i = 0; $i < $numRows; $i++) { $arr.$x[] = $todas[$i][$x]."\n"; //problem here } } echo $arr0[0]; echo $arr1[0]; ...
But I get this warning: Cannot use a scalar value as an array
and the echo does nothing. What for? and what is the solution?
arrays loops php for-loop
user947462
source share