<?php
session_start();
$main_dishes = array('cuke' => 'A',
'stomach' => "B",
'abalone' => 'C');
if (count($_SESSION['order']) > 0) {
print '<ul>';
foreach ($_SESSION['order'] as $order) {
$dish_name = $main_dishes[ $order['dish'] ];
print "<li> $order[quantity] of $dish_name </li>";
}
print "</ul>";
} else {
print "You haven't ordered anything.";
}
?>
|