对象与数组的相互转换
PHP----zend框架中: 用toarray()方法可以把对象变成数组
PHP----laravel框架中:->get()方法
例:
$list = DB::table('student_person') //查询student_person表中的数据
->select('number','email','mobile', 'date_of_birth','nickname','realname','birthday')//查询表中所有括号内,列字段的数据
->where('number',$id) //查询number等于$id的一行数据
->get(); //get方法对象变成数组

浙公网安备 33010602011771号