I have a simple View that has a global custom text field with the value of "hi". I have a global PHP field that tries to print this value with, echo $row->nothing;
.
echo $row->nothing;
As this is the strange name that's listed in the available variables of the PHP field. The result is nothing. If I try to dump the content of $row$row
with, echo var_dump($row);
.
echo var_dump($row);
The resultoutput is, { ["nothing"]=> NULL } the following.
{ ["nothing"]=> NULL }
When I try the same thing with a Math Expression instead of a Custom Text, it works as expected, printing out the result of the expression. Some fields seem to work, while others don't. Unfortunately the ones I want to use don't work.
I found this personWhy does Views PHP give me NULL for $row->path? discussing a similar problem, but I wasn't able to translate their solution intothe given answer did not help in solving the problem I've described. Any help is much appreciated!
I'm using Drupal 7.77, Views 7.x-3.29, and Views PHP 7.x-1.1.