-2
在数组中找到一个包含值的对象的最快方法是什么?在PHP中查找数组中的对象关键字
例如,我需要找到对象橙色(其具有索引)的数组索引。
(StandardClasses的阵列)
[
{"apple":
{"color" : "green", "shape" : "round"}
},
{"orange":
{"color" : "orange", "shape" : "round"}
},
{"banana":
{"color" : "yellow", "shape" : "long"}
}
]
'的foreach循环的内部'+'break'。 –