so I'm working on this theme on my localhost, and I just uploaded it to see if it'd work and I'm getting a weird parse error for these lines in my functions.php file. It works fine on my localhost though:
$next = isset($_POST['next']) ? $_POST['next'] : false;
$prev = isset($_POST['prev']) ? $_POST['prev'] : false;
$nexp = explode('=', explode('?', $next)[1])[1];
$pexp = explode('=', explode('?', $prev)[1])[1];
It says, unexpected '[' on the line starting with $nexp and $pexp. I'm a bit confused (and tired), and I don't really see what the problem with this line is, and why it would work on localhost but not on the server.
Any help would be appreciated.