PHP数组问题,取出多维数组前面的
PHP数组问题,取出多维数组前面的维数。
Array ( [0] => Array ( [username] => test2222 [id] => 66) [1] => Array ( [username] => test [id] => 64 ) [2] => Array ( [username] => test [id] => 62 ) [3] => Array ( [username] => aaa [id] => 61 ) ) ,需要做分页。第一页的时候,用$key能正常显示,0-9。下一页的时候应该是10-19,可还是显示的是0-9,和第一页一样
------解决方案--------------------
foreach($list as &$r) $r['序号'] = $pageoffs++;<br />$this->assign('list',$list);<br />