Associative Array Disappears Inside Program

From: Date: Wed, 30 Apr 2003 15:35:37 +0000
Subject: Associative Array Disappears Inside Program
Groups: php.general 
Request: Send a blank email to php-general+get-145795@lists.php.net to get a copy of this message
Hello, I have something weird happening in my program. The program works like this: 1) ask how many courses are being taken then assign that value to an associative array $database_array[courses] 2) draw two input text boxes for each course (a box for credit hours a box for grade). I accomplish this by the following line of code: for ($boxCreator=0; $boxCreator < $database_array[courses]; $boxCreator++) 3) Calculate a gpa by using the normal equation plugging in the values in each box from step 2. Also, print out the value of $database_array[courses]. Everything works fine except the final step in #3. There is no value stored in $database_array[courses] at this point. Can anyone tell me why at this point? Thanks in advance, Roger

« previous php.general (#145795) next »