How to get the actual value of a field in Views? I'm using the Views module and Drupal 7 and want to add a class to all rows of my table that have a certain value for a certain field.

The field is a bit field and is included in my query. I have added a PHP field (a separate Views module that is installed) with the following code:

if ($row-&gt;field_kampioen || $row-&gt;field_spirit) {
    return 'views-table-highlight';
} else {
    return '';
}


This should allow me to set the row class to [php]. This works, but all rows get the css class. When I output this for debugging:

return $row-&gt;field_champion . ' ' . $row-&gt;field_spirit . ' ';


I see that the classes are all different numbers, and field_champion is equal to field_spirit. This makes me think I'm seeing the ID.

How can I get a TRUE of FALSE? So, how can I get the actual bit value of this field?

It would be nice if I could do this via the Views module only, but I've seen pages where hooks are used. Maybe I'll have to use that.
I'm assuming you are using Drupal 6, since you mentioned about PHP filed.

below is the code to retrieve value from a field and where ['tid_1'] is the token for a field. I think this is similar for Drupal 7 too.

&lt;?php     
$static = $this-&gt;view-&gt;display_handler-&gt;get_handlers('field');    

$b=$static['tid_1']-&gt;last_render; //$b contains the value of the field
$d=$static['tid_2']-&gt;last_render; //$d contains the value of the field   
//use your logic
 ?&gt;