How to filter views result using the views_php module? I have 2 integer fields in views , first field is 'field_code' and second field is 'field_rank',
Finally I want filter views result, with views_php module.
I use this code but it does not work,

$math = ($row-&gt;field_code / $row-&gt;field_rank) * 100;
if ($math &lt; '30') { return TRUE; }


Please can someone help me to fix this problem.
It is a Drupal bug that is in active state until date but there are some work-arounds, one of them I am sharing with, if it could help you out.
Use $data variable to access your fields value because $row only gives numbers, which appear to be node ID's (Drupal Bug).

Use the following code I wrote in Global:PHP 'filter code' text area

$field_code = $data-&gt;_field_data['nid']['entity']-&gt;field_code['und']['0']['value'];
$field_rank = $data-&gt;_field_data['nid']['entity']-&gt;field_rank['und']['0']['value'];

$math = ($field_code / $field_rank) * 100;
if ($math &lt; '30') {
  return TRUE;   
  // If you dont want to display the result otherwise use FALSE in place of TRUE
} 


Use this code as it is in your view. It works perfect; I have tested it.