Fixed many issues with PHP evaluation in views.

There was an issue with use of the fetch class in views, now fixed.