How to conditionally display field contents in Views I want to edit my View so that it only displays a certain contents if some field in my content type had been set. I installed the Views PHP plugin, but it's currently not producing the desired results.

This is the current example I have - using the custom php field, where field_link_to_page is a checkbox field in my content type that decides what contents are to be displayed:

&lt;?php
// Field is configured to return "1" if it's checked, or "0" if it's unchecked.
if ($row-&gt;field_link_to_page =="1") {
    echo $row-&gt;body."&lt;a href=\"node/"

?&gt;
[NID]
&lt;?php
echo "\"&gt;more...&lt;/a&gt;";
}
else
{
    echo $row-&gt;body;
}
?&gt;


Removing this code, and doing a var_dump() on the field, returns something like this:

object(stdClass)#250 (7) { ["field_year"]=&gt; string(3) "113" ["field_month"]=&gt;
string(3) "113" ["field_day"]=&gt; string(3) "113" ["title"]=&gt; string(73) 
"Forecast opening day for Talking Rock Golf Course (conditions permitting)" 
["body"]=&gt; string(3) "113" ["field_link_to_page"]=&gt; string(3) "113" ["php"]=&gt; 
NULL } 113


which is confusing because the contents get rendered nicely by Views but here it only looks like it's handles to something (113). How can I render the contents correctly in php?
I have figured out a way to do what I want without the Views PHP module:
I added the link to my fields as well and rewrite the link token in my checkbox field (field_link_to_page) only if it isn't empty. That seems to have worked out well.