Hello Guys,
I am trying to output the number of checkboxes returned by my array $selected. But unfortunately it won't output the value in my count(array). I really need help on this as I want to know how many successful checkboxes were retrieved.
Here's my sample code π
<?
echo "";
echo "<body>";
echo count($selected);
echo $selected[1];
echo $selected[2];
echo count($selected);
echo '<form method="post" action="checks.php">';
echo '<input type="checkbox" name="selected[]" value="shoes">Shoes<br>';
echo '<input type="checkbox" name="selected[]" value="sandals">Sandals<br>';
echo '<input type="checkbox" name="selected[]" value="socks">Socks<br>';
echo '<input type="submit" name="act" value="submit">';
echo '</form>';
echo "</body>";
echo "";
?>
Suggestions are highly regarded.. π
as well as other better algo π
Thanks,
Michesπ