Making variables with an iteration? STILL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux