I have been developing locally using Mamp, and everything was great until I uploaded to the server. I have narrowed my problem down to having to do with the php version. Mamp was running on a newer version than the server.
If I run Mamp on PHP 5.6.2(or 5.5.X) I have no problems with my code. But if all I do is change the PHP version in Mamp preferences to PHP 5.3.29 if complains about the following line of code:
$shipping = reset($arrShipOptions['options'])[0]['price'];
The error is:
syntax error, unexpected '['
First thing that came to mind was that reset() might be a new function. But according to http://php.net/manual/en/function.reset.php it was already available in PHP 4
Could an extra pair of eyes shed some light on this please. Thanks