比如我一个记录集$row 里面有一百条记录。
for($k=0;$k $arr=array($a[$k],$b[$k],$c[$k]));
print_r($arr);
}
我现在可以把这一百条循环出来,是一百个一唯数组,我现在想把这个变成一个二维数组,求写发。。
按照上面输出的结果是
Array ( [0] => a1 [1] => b1 [2] => c1 )
Array ( [0] => asdf2 [1] => b2df [2] => b2sd )
Array ( [0] => a3 [1] => b3 [2] => b6 )
Array ( [0] => a4 [1] => b4 [2] => sdfs )
我想要这样子的结果。,
是$test=Array ( [0] => a1 [1] => b1 [2] => c1 ) ,Array ( [0] => asdf2 [1] => b2df [2] => b2sd ) ,Array ( [0] => a3 [1] => b3 [2] => b6 ),Array ( [0] => a4 [1] => b4 [2] => sdfs )
for($k=0;$k<100;$k++){ $arr[]=array("a$k", "b$k", "c$k"); }print_r($arr);