Shouldn't this work?
$tmp = explode('=', 'name=value');
$value1 = $tmp[1]; // ok
$value2 = explode('=', 'name=value')[1]; // Parse error: syntax error, unexpected '['
(Adding unnecessary text so that the post meet the quality standard)
Shouldn't this work?
$tmp = explode('=', 'name=value');
$value1 = $tmp[1]; // ok
$value2 = explode('=', 'name=value')[1]; // Parse error: syntax error, unexpected '['
(Adding unnecessary text so that the post meet the quality standard)
You're using <=PHP5.3 on your server and the code there is valid for PHP5.4+
Change to:
$value2 = explode('=', 'name=value');
$value2 = $value2[1];
and it will work.