I have an array in the following format:
$myArray = array(
'CA' => array
(
'la' => 'Los Angeles',
'sf' => 'San Francisco'
),
'NY' => array
(
'nyc' => 'New York'
),
'TX' => array
(
'austin' => 'Austin',
'houston' => 'Houston',
'dallas' => 'Dallas'
)
);
If I have variables for State and City name how do I get the key for city value?
$state = 'CA';
$city = 'Los Angeles';
$cityKey = ???
I think i can get it without running a loop, right?