hello ppl I have array like this

$fruit = array(
        "apple" => array(
                "color" => "red",
                "taste" => "sweet",
                "shape" => "round"
),

    "orange" => array(
            "color" => "orange",
            "taste" => "sweet",
            "shape" => "round"
),
        "banana" => array(
                "color" => "yellow",
                "taste" => "pastey",
                "shape" => "bananashaped"
)
);

and anyone can explain a foreach how to get output like this

apple =
color = red
taste = sweet
shape = round

orange =
color = orange
taste = sweet
shape = round

banana =
color = red
taste = pastey
shape = bananashaped

?

    foreach ($fruit as $key => $value) {
        echo $key . ' =' . '<br />';
        foreach ($value as $key2 => $value2) {
            echo $key2 . ' = ' . $value2 . '<br />';
        }
        echo '<br />';
    }
      Write a Reply...