如何把结果对象转成数组
2015-02-01
展开全部
$modelList = (array)$modelList;
或者 $modelList = new ArrayObject($modelList);
或者 $modelList = new ArrayObject($modelList);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2015-02-01 · 知道合伙人影视综艺行家
关注
展开全部
Student s1=new Student("张三","20");
Student s2=new Student("李四","21");
Student s3=new Student("王五","22");
Student s4=new Student("赵六","23");
Student s5=new Student("马奇","24");
Student [] demo={s1,s2,s3,s4,s5};
List<Student> al=new ArrayList<Demo>();
for(int i=0;i<demo.length;i++){
list.add(demo[i]);
}
Student s2=new Student("李四","21");
Student s3=new Student("王五","22");
Student s4=new Student("赵六","23");
Student s5=new Student("马奇","24");
Student [] demo={s1,s2,s3,s4,s5};
List<Student> al=new ArrayList<Demo>();
for(int i=0;i<demo.length;i++){
list.add(demo[i]);
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询