I'm checking whether a checkbox should be checked against a user preferences array of id's with:
if(in_array($category['id'], $checkedarray)){
$checked = "checked='checked'";
}
the result of checked array looks something like:
array(43) {
[0]=>
string(2) "31"
[1]=>
string(2) "32"
[2]=>
string(2) "34"
[3]=>
string(2) "35"
}
In the above array example, 33 still returns true even though its not in there.
I've tried using:
(in_array($category['id'],$checkedarray, true)
The results were same as without the strict condition.
Any suggestions would be greatly appreciated.