数组中可以嵌套 各种类型的数据 数值型,字符型,数组,对象
$obj=new Classuser();
$obj->name='Jack';
$arr=[
'age'=>26,
'name'=>'Peter',
'edu'=>['html','css','php'],
'user'=>$obj,
];
print_r($arr);
print_r($arr['user']->name);
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!