In PHP 3.0.14, I am trying to condition output based on whether values in array $Submitted are found in array $MainList.
I want to show input checkboxes as checked if a name in $Submitted is found in $MainList. Using loop within a loop to set a variable but it is not working.
for($i=0; $i<count($MainList); $i++)
{
for($n=0; $n<count($Submitted); $n++)
{
if($Submitted[$n] == $MainList[$i])
{
$Checked = "checked";
}
else
{
$Checked = "";
}
}
}
in_array (PHP4) would be perfect...but I am not able to change to PHP4. Any help will be appreciated.
Tom