need to loop through this multidimensional array and output the menu items along with the prices? $pizzashop=array("supreme"12.00?

1 Answer

Relevance
  • Anonymous
    6 months ago

    setlocale(LC_MONETARY, "en_US");

    $pizzas = array(array("supreme", 12), array("meatlovers", 13.95), array("chicken supreme", 14));

    foreach($pizzas as $pizza) {

    echo $pizza[0] . " - " . money_format("%i", $pizza[1]) . "\n";

    }

    • Login to reply the answers
Still have questions? Get your answers by asking now.