Here is my array:
$option = array (
'fruit' => array ('banana','apple'),
'vegetable' => array ('cucumber','lettuce'),
'nut' => array ('almond','peanut')
);
All I want to do is print the second key. How can I write this?
<?php print $option[key[1]] ?>
I want the above to print out 'vegetable'.
$option = array (
'fruit' => array ('banana','apple'),
'vegetable' => array ('cucumber','lettuce'),
'nut' => array ('almond','peanut')
);
All I want to do is print the second key. How can I write this?
<?php print $option[key[1]] ?>
I want the above to print out 'vegetable'.