PHP 4.0 Bug #5550 Updated: <input type=checkbox name=\"test[$i]\"> is not working correctly when submittin

From: Date: Wed, 26 Jul 2000 19:50:58 +0000
Subject: PHP 4.0 Bug #5550 Updated: <input type=checkbox name=\"test[$i]\"> is not working correctly when submittin
Groups: php.dev 
Request: Send a blank email to php-dev+get-26366@lists.php.net to get a copy of this message
ID: 5550 Updated by: zak Reported By: stormlord@the.net.nz Status: Closed Bug Type: Other Assigned To: Comments: This is a logical error in the program, not a bug. When you loop over your values with the line: for($i=0;$i<count($todel);$i++) you are only running the loop as many times as you have elements in your array. If 2,3,4 are selected, then the count of $todel is 3... so the 4th element will never be reached. Try changing the contents of your else statement to: foreach ($todel as $key => $value) echo "$key - todel = ".$todel[$key].'<br>'; Full Bug description available at: http://bugs.php.net/?id=5550

« previous php.dev (#26366) next »