【发布时间】:2019-09-16 01:33:40
【问题描述】:
控制器
$data['userInfo'] = $this->user_model->get15();
用户模型
function get15()
{
$this->db->select('userId');
$this->db->from('tbl_security');
$this->db->order_by('userId','ASC');
$this->db->where('status', 0);
$query = $this->db->get();
$result = $query->result_array();
return $result;
}
我得到的数组
array(1) { [0]=> array(1) { [0]=> array(1) { ["userInfo"]=> array(7) { [0]=> array(1) { ["userId"]=> string(2) "15" } [1]=> array(1) { ["userId"]=> string(2) "17" } [2]=> array(1) { ["userId"]=> string(2) "18" } [3]=> array(1) { ["userId"]=> string(2) "19" } [4]=> array(1) { ["userId"]=> string(3) "178" } [5]=> array(1) { ["userId"]=> string(4) "1444" } [6]=> array(1) { ["userId"]=> 字符串(5) "12778" } } } } }
【问题讨论】:
标签: php arrays codeigniter