so i have 2 lists i need to compare
$list = array("Apple", "Orange", "Lemon", "Candy");
and
$db = $r_bio['other'];
$db2 = explode(":", $db);
i want to compare the two and if i find the same i want to echo a checked checkbox if not an unchecked checkbox
if($db2 == $list)
{ echo "<input type=checkbox checked value=$list />$list"; } else { echo "<input type=checkbox value=$list /> $list"; }
the $db2 can contain 1, 2, ..., or all of the items in the $list