<?
    $xml = new SimpleXMLElement(file_get_contents("menu.xml"));
?>

<!DOCTYPE html PUBLIC
     "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Lunch</title>
  </head>
  <body>
    <form action="sqlite.php" method="post">
      <b>Name:</b> <input name="name" type="text" /> <input type="submit" value="Submit Order" />
      <br /><br />
      <table border="0">
        <? foreach ($xml->xpath("/menu/category[@name='Specialty Sandwiches']/item") as $item): ?>
          <tr>
            <td valign="top"><input id="<?= $item["name"] ?>" name="item" type="radio" value="<?= $item["name"] ?>" /></td>
            <td>
              <label for="<?= $item["name"] ?>">
                <b><?= $item["name"] ?></b>
                <br />
                <?= $item ?>
              </label>
            </td>
          </tr>
        <? endforeach ?>
      </table>
    </form>
  </body>
</html>
