You can easily check the contents of an object (e.g. $node) by installing the Devel module and using dsm($node),
In the case of a flag, CCK $node->field_fieldnamecontains an array with at least one element. Each item corresponds to each check box for the field, and the key valuefor the check box item is set to the value specified in the configuration for the field.
Otherwise, if the box is unchecked, it will not be displayed as an element inside $node->field_fieldname.
, , $node->field_fieldname - , value / NULL.
, , , field_checkbox, : 1) Foo, foovalue 2) Bar, barvalue.
, Foo, :
foreach ($node->field_checkbox as $checkbox) {
if ($checkbox['value'] == 'foovalue') {
return TRUE;
}
}
user113292