Views php field table sorting error I have a taxonomy view with table list and I insert my code into a global php field and use enable click sort: sort numerically, but when I click the label to sort numerically I always get the error below.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /stocks/views/ajax
StatusText: OK
ResponseText: 
Fatal error:  Function name must be a string in C:\xampp\htdocs\stocks\sites\all\modules\views_php\plugins\views\views_php_handler_field.inc on line 185


Whats causing this and is there a way to fix it? Im trying to have the field sort by highest number to lowest.

This is the code I am using in the php field.

&lt;?php
$currentMonth = date('n');
    $currentMonth = $currentMonth - 1;
    $prevcurrentMonth = date('n');
    $prevcurrentMonth = $prevcurrentMonth - 2;
    $currentDay = date('j');
    $lastDay = $currentDay - 6;
    $currentYear = date('Y');

    $file = file_get_contents("http://ichart.finance.yahoo.com/table.csv?s=$row-&gt;name&amp;a=$prevcurrentMonth&amp;b=$lastDay&amp;c=$currentYear&amp;d=$currentMonth&amp;e=$currentDay&amp;f=$currentYear&amp;g=d&amp;ignore=.csv");

    $stockcontent = str_replace('Date,Open,High,Low,Close,Volume,Adj Close', '',  $file);
    $stockcontent = trim($stockcontent);

    $stockcontentex = str_getcsv($stockcontent, "\n");

    $stockex = explode(',',$stockcontentex[0]);

    print $stockex[2];
?&gt;
Review this post

You will find there is a value box and a output box. 

Your code above suggest you are doing the display from the value box and that won't work.

move most of your code to the value box and then end with:

value = $stockex[2];


then paste 

&lt;?php
    print $value
    ?&gt;  

in the output box. 

Good Luck!