I have the following setup where I'm trying to use an array of array structure. I'm not sure how to get the key value once the value is found in the array of arrays.
$testboat = 'smallest boat';
$allboats = array(40=>array(1=>'big boat',
2=>'bigger boat'
),
30=>array(1=>'little boat',
2=>'tiny boat',
3=>'smallest boat'));
foreach($allboats as $boats){
foreach($boats as $boat){
if($testboat == $boat) {
/*looking to echo the key or value 30; */
}
}
}