【发布时间】:2025-12-16 04:40:01
【问题描述】:
我有这个数组:
$Fruit = 数组()
$Fruit[$species][$property] = $value
Array
(
[Apple] => Array
(
[Green] => 4
[Spots] => 3
[Red] => 3
[Spots] => 2
)
现在我想搜索第二个数组中是否存在键...
我试过了:
if (!array_key_exists($property, $Fruit->$species))
但它不起作用......
有谁知道如何在数组的数组中搜索...?
问候, 泰斯
【问题讨论】:
标签: php multidimensional-array array-key