Question... looping through an array passed via POST
Posted: Wed Mar 01, 2006 1:09 pm
Ok, I've never had this problem before.
Basically, I have some tabular data, and every row has a checkbox
So you can check like 5 boxes and commit an action on them...
Something like that, where the value is the ID of the record.
The problem is, when I print_r($_POST['checked']) all that is outputted is "Array" which is friggin bizarre.
So basically when I loop through the array nothing happens. Any ideas?
Basically, I have some tabular data, and every row has a checkbox
So you can check like 5 boxes and commit an action on them...
Code: Select all
<tr bgcolor="#dddddd">
<td><input type="checkbox" name="checked['43914']" value="1" style="margin: 0px;" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td><input type="checkbox" name="checked['43999']" value="1" style="margin: 0px;" /></td>
</tr>
<tr bgcolor="#dddddd">
<td><input type="checkbox" name="checked['44326']" value="1" style="margin: 0px;" /></td>
</tr>The problem is, when I print_r($_POST['checked']) all that is outputted is "Array" which is friggin bizarre.
So basically when I loop through the array nothing happens. Any ideas?