Fixes for PHP 5.3 compatability.
Server didn't have requirements for fetch_all, so had to break out.
Shorthand [] for array declaration replaced with array()
JSON_PRETTY_PRINT now has version check of 5.4