A link for each array value
Posted: Wed Feb 10, 2010 2:47 pm
I have a form with several check boxes.
The checkbox serves as an array
When I submit the form, I want to display what was checked:
That displays all of the values that were checked but what I want to happen is show the first value in the array, click next, show the second value of the array (page[2] ?), click next, show the third value (page[3] ?), and so forth untill there are no more values in the array
The checkbox serves as an array
Code: Select all
<input type="checkbox" value="1" name="page[]" /> Checkbox 1 <br/>
<input type="checkbox" value="2" name="page[]" /> Checkbox 2 <br/>
...Code: Select all
$page = $_POST['page'];
foreach ($page as $value)
{
echo $value . "<br />";
}