|
本帖最后由 cncifans 于 2010-11-3 17:44 编辑
$rs=$this->db->order_by('orders','asc')->get_where('programa',array('parentid'=>0))->result();
$list=array();
foreach($rs as $val)
{
$next=$this->db->order_by('orders','asc')->get_where('programa',array('parentid'=>$val['id']))->result_array();
foreach($next as $n)
{
$list[$val['id']][]=$n;
}
}
这样写报错,那里面的那一段该怎么写? |
|