次のような配列があります。
Array
(
[100] => Array
(
[room_id] => 100
[name] => Town Center
)
[110] => Array
(
[room_id] => 110
[name] => Coffee Shop
[pin_id] => 7146
[pin_x] => 570
[pin_y] => 150
)
)
「pin_id」値がある場合、特定の値のキーを見つける方法があるかどうか疑問に思っていました。例えば:
Array
(
[100] => Array
(
[room_id] => 100
[name] => Town Center
)
[110] => Array <- I want to get this key "110"
(
[room_id] => 110
[name] => Coffee Shop
[pin_id] => 7146 <- Because "pin_id" is here
[pin_x] => 570
[pin_y] => 150
)
)