How to print the second value of an array?

1

I have this array and I want to put the string "Banana" on the screen.

$frutas = array (
"frutas" => array("a"=>"Laranja", "b"=>"Banana", "c"=>"Maçã"),
"numeros" => array(1, 2, 3, 4, 5, 6),
"buracos" => array("primeiro", 5 => "segundo", "terceiro")
);

How can I do this?

    
asked by anonymous 11.10.2017 / 22:08

1 answer

4

Simple like this:

echo $frutas["frutas"]["b"];
    
11.10.2017 / 22:09