例子:
array(1){
[0]=>array(
'id'=>111, 'name'=>'aaaa' ) } 由上面的例子转化成下面对象,怎么转化?急急 急 谢谢
array(1) {
[0]=>
object(stdClass)#23 (10) {
["id"]=>111,
["name"]=>'aaaa'
}
} 解决办法:
1.
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnUAAAB8CAIAAACABdHiAAAOPUlEQVR4nO3dvW7jRhuG4TkmntAchvYMpnIOQulcjDpuoU6Ft5BhZbZcxhDW2cAftJULRhZs2F/BvyE5pEhpRFn0fcFAlDH/RCR+9L4cUuIdAAD4Js59AAAAjBD5CgCAf+QrAAD+Ffm62+2iKFqtVrcAAKCBMebvv//e7Xad8nW32/3111///PMrjv/bbnen/vn5838xAAAX6Onp6eHhYbVaPT8/78/XKIr++efXAMlKvgIARuDnz59RFO3P19VqNUzlSr4CAEbg6enJGLM/X29vb7fbZ/IVAICObm9vO+brQOFKvgIARoB8BQDAP/IVAAD/yFcAAPwjXwEA8I98BQDAP/IVAAD/yFcAAPwbS74uZRiaE5yfy6ClkNr6d/MSiPfSSNNg8atX3WXJcxnskI7c0RmP06ggUJ/3/wHg4xk4X3+b+Ww2m93c+8vXpbyeiPRn+qEyYSBGBaL6F30nj8lX5+p9DkeIyhF1H2xyzCH1cuSOznmcWnY9mwAGMGS+rm9mc7P5beb+8nWtwklwt46jqVgsT3mePixXusbxToq3HrWMI1/3r+6ql7QUgTKVY+o+2KLnOzrcwe+9x+o+OHeUnNUB9g5gv+H7w97zVUaxubsK7tbFcDQVeVGb5240FYtQhem4jJoHj2Ne/hDvX9Kft68mH3z7arZfg/cv4v2L3LUOlldPRpLfZgv8obZxHHf+g6rluxDvotpRfAlEOi5K+dqVlsK1e2dqdh/sYifFq1JvycEH6cko3mb+To16C9SLFO8ieFHSOgPWez+s5Gt47/XFqod0/GALxwnVsnOTAIBPF56vRZQ2RGMawNmSV+oxe53krnPQIe1lFrr8wdp+Dd6/BC/rOI3SP+XrVxOv1ZsVnLVB1+pL+f5FvC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