我有时将数组作为一个位置或多个位置返回,我想使用变量 $location = egypt 检查数组;如果找到此值,则从所有此位置数组中重新调整此数组
stdClass Object
(
[count] => 2
[query] => Cairo
[locations] => Array
(
[0] => stdClass Object
(
[id] => 1190
[name] => Cairo, Egypt - 341 hotels
[country_name] => Egypt
[country_code] => EG
[state_name] =>
[state_code] =>
)
[1] => stdClass Object
(
[id] => 11016
[name] => Cairo, GA, United States - 4 hotels
[country_name] => United States
[country_code] => US
[state_name] => {"en":"Georgia"}
[state_code] => GA
)
)
)