Making variables with an iteration? STILL

From: Date: Mon, 06 Dec 2004 15:55:21 +0000
Subject: Making variables with an iteration? STILL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-203600@lists.php.net to get a copy of this message
Here's the full code and the driving page: http://rsossam-lap.ces.ncsu.edu/leadership/test.html <snip> <?php for ($i=1; $i<10; $i++) { if (isset ($_POST['choice'.$i])) { for ($j=1; $j<5; $j++) { $tempChoice = "choice" . $j; $$tempChoice = $_POST['choice'.$i]; } } } echo $choice1; echo $choice2; echo $choice3; echo $choice4; ?> </snip> The problem seems to be that it is only doing this on the last one, no matter which one it is... I know it is in the iterations, but I can't place my finger on where I need to change things up. -- 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

« previous php.general (#203600) next »