Views PHP is outputting incorrectly I'm trying to work with Views PHP but for some reason something is going completely wrong. I have a content field called telephone. In this field is a number "06-12345678" now I want to use Views PHP to remove the "-" so I get the number "0612345678".

What I do is I make a view with the field Telephone and a Global: PHP field underneath it. In this Global: PHP field I add the following code to see if it is working.

&lt;?php print $row-&gt;field_telephone; ?&gt;


So when I save this field I get the output: "11" instead of 06-12345678.

When I try &lt;?php print $row-&gt;field_title; ?&gt; it does give me the suspected output..? What am I doing wrong? How can I solve this?
$data-&gt;field_field_telephone[0]['raw']['value'];


This will give you your value from that field in Views PHP. If you use dpm() from Devel module it will show you that $row-&gt;field_telephone is 11. that's the NID.

Try to avoid using Views PHP unless you are doing something too complex for views. And even then you should try to write a custom module to interact with views instead of saving code in the DB.