Making variables with an iteration?
| From: | Robert Sossomon | Date: | Mon, 06 Dec 2004 14:28:59 +0000 |
| Subject: | Making variables with an iteration? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-203586@lists.php.net to get a copy of this message | ||
I've got some inputs, which I need to tie down to only have 4 come in from. The javascript to verify it is working somewhat, however I want to create the parsing script to loop through the inputs (choice) and then dump them into $choice1, $choice2, $choice3, $choice4 respectively.
I have to use checkboxes with different names with the javascript checkers I am using, since they seem to be working, however I can't seem to get the PHP in the parser to write the variables. Any ideas?
<SNIP>
for ($j=1, $j<5, $j++)
{
$choices.$j= $_POST['choice'.$i];
}
Thanks,
Robert
--
Robert Sossomon, Business and Technology Application Technician
4-H Youth Development Department
200 Ricks Hall, Campus Box 7606
N.C. State University
Raleigh NC 27695-7606
Phone: 919/515-8474
Fax: 919/515-7812
robert_sossomon@ncsu.edu