标签:对象 code alt pre 开始 技术 二维数组 http use
$users = array( ‘1‘=>array(‘id‘=>1,‘age‘=>‘1‘), ‘2‘ => array(‘id‘=>2,‘age‘=>‘2‘),
这个二维数组的索引值若果是从1开始,返回的就是对象对象
<?php $users = array( array(‘id‘=>1,‘age‘=>‘1‘), array(‘id‘=>2,‘age‘=>‘2‘), array(‘id‘=>3,‘age‘=>‘3‘), array(‘id‘=>4,‘age‘=>‘4‘), array(‘id‘=>5,‘age‘=>‘5‘), array(‘id‘=>1,‘age‘=>‘1‘), array(‘id‘=>2,‘age‘=>‘2‘), array(‘id‘=>3,‘age‘=>‘3‘), array(‘id‘=>4,‘age‘=>‘4‘), array(‘id‘=>5,‘age‘=>‘5‘), array(‘id‘=>1,‘age‘=>‘1‘), array(‘id‘=>2,‘age‘=>‘2‘), array(‘id‘=>3,‘age‘=>‘3‘), array(‘id‘=>4,‘age‘=>‘4‘), array(‘id‘=>5,‘age‘=>‘5‘), );
这个二维数组的索引值若果是从0开始,返回的就是数组对象
关于json_encode一个二维数组,返回一个数组对象还是对象对象
标签:对象 code alt pre 开始 技术 二维数组 http use
原文地址:http://www.cnblogs.com/hanshuai0921/p/6676454.html