php 3 to 5 upgrade: foreach loop no longer working
| From: | Vernon Webb | Date: | Tue, 18 Apr 2006 18:02:32 +0000 |
| Subject: | php 3 to 5 upgrade: foreach loop no longer working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-234199@lists.php.net to get a copy of this message | ||
I've recently upgraded a server from Fedora Core 3 to Core 5 in the process php had
been upgraded from either 3 or 4 to php 5. In doing so I had to do a major overhaul of
a web site as many things stopped working (.i.e $HTTP_POST_VAR, etc). Haven't gotten
through most of that I know have a problem with a page that is being submitted to
another page which contains different values for checkboxes. I would pull the values
from each checkbox using a foreach loop as such:
foreach ($checkbox as $value) {
echo "Value: $value<br />\n";
}
however the value is no longer being echoed to the page.
What am I missing here?
This is the code that is being submitted, $num being an incremented value:
<input name="checkbox[<?php echo $num; ?>]" type="checkbox"
id="checkbox[<?php echo
$num; ?>]" value="<?php echo $row_rsADS['customers_id']; ?>" />
Thanks in advance