count 展示问题

浏览:2352 发布日期:2014/07/17 分类:求助交流 关键字: count group volist 展示
我已经将需要统计的内容写好了,dump出来的结果是数组形式,也是我想要的结果。但是在html页面上怎么输出啊?求助~~~
我的统计代码如下:
$user=M('User');
$usercount=$user->field('count(id)')->group('dept')->select();
$this->assign('data1',$usercount);
$this->display();
我dump($usercount)的数据是对的,如下:
array (size=3)
0 =>
array (size=1)
'count(id)' => string '5' (length=1)
1 =>
array (size=1)
'count(id)' => string '2' (length=1)
2 =>
array (size=1)
'count(id)' => string '1' (length=1)
我通过volist展示不了啊? 输出来的仍然是<{vo1.count(id)}>而不是里面的数据,为什么?

<volist name='data1' id='vo1'>
<tr>
<td><{vo1.count(id)}>人 </td></tr>
</volist>

求助,谢谢
最佳答案
评论() 相关
后面还有条评论,点击查看>>