I've coded this up:
PHP Code:
<?php
$mains = array(
array(
'Shitake, Portobello, button & oyster mushrooms (v)',
'£10.50',
'& leeks with blue cheese guacamole & home-made salsa'
),
array(
'Chicken fillet strips',
'£12.50',
'with lemon & paprika, creamy guacamole & home-made salsa'
),
array(
'Flame-grilled sirloin steak',
'£13.50',
'with horseradish guacamole & salsa Criollo'
)
);
?>
<dl>
<?php
foreach($mains as $mainsItem){
echo '<dt><strong>'.$mainsItem[0].'</strong> <span>'.$mainsItem[1].'</span></dt>'."\n".'<dd>'.$mainsItem[2].'</dd>';
}
?>
</dl>
I used an array because I don't know SQL, but the idea is exactly the same, load a series of PHP variables from some data (wherever it's stored) and put it into a PHP foreach inside a (semantically perfect and infinitely better than a table)!
See a demo here: Restaurant Menu | CSS
Bookmarks