Mega Code Archive
Categories
/
Php
/
Form
A select menu with different choices and values
$sweets = array('puff' => 'A', 'square' => 'C', 'cake' => 'B', 'ricemeat' => 'S'); function show_form() { print<<<_HTML_
Your Order:
_HTML_; foreach ($GLOBALS['sweets'] as $val => $choice) { print "
$choice
\n"; } print<<<_HTML_
_HTML_; } ?>