PHP Code:
while ($div=mysql_fetch_array($query4MYSQL_ASSOC)) {
    
//$div - shows all the entries    

$row22=mysql_fetch_array($query2MYSQL_ASSOC);
//row22 - shows all the entries that should be checked
$name= array($div['date_id']);
$datess=$row22['date_id'];

if (
in_array($datess$nametrue)) {

echo 
'<input type="checkbox" value="' $div[date_id] .'" checked>' $div[date] . '</option>';

}else{

echo 
'<input type="checkbox" value="' $div[date_id] .'">' $div[date] . '</option>';



1. when echo $row22 shows only the entries that should be checked - working good
2. checkboxes show checked if only the first checkbox is selected or all 3 - if a combination is selected, it is all blank.


Any ideas?
Thank you