On Tue, 21 Sep 2004 20:26:04 +0100, Luke Mackenzie <[EMAIL PROTECTED]> wrote:
> i would like to to put multiple selections from a form list into a single
> variable using foreach but am unsure how to do so.
> 
> can someone advise how to adapt the following code?

<?php

print "You are interested in: ";

print "<select multiple name=\"select_field[]\">";

foreach($myGoals as $key => $value)
{
  print "<option value=\"$key\">$value</option>";
}

print "</select>";

?>

untested..


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to