> > 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: "; > > foreach($myGoals as $value) > > { > > print "$value "; > > } > > ?>
Not to do all the work for you but do you mean: You are interested in: <form method="post" action="phpPage.php"> <?php foreach ($myGoals as $value): ?> <input type="radio" name="goals" value="<?php echo $value; ?>"><?php echo $value; ?> <?php endforeach; ?> </form> -- --Matthew Sims --<http://killermookie.org> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php