$post_date = explode(" ", $post_event)[0];
You're probably trying to use array dereferencing feature on a PHP version that doesn't support it. It's available only on PHP 5.4+ versions.
From the PHP manual:
As of PHP 5.4 it is possible to array dereference the result of a function or method call directly. Before it was only possible using a temporary variable.
As it says, you'll have to use a temporary variable on older versions of PHP:
$temp = explode(" ", $post_event);
$post_date = $temp[0];
Change all the occurences similarly.
Or, you could use list() to do it in one line (reduces readability a bit, though):
That is, you can replace:
$post_date = explode(" ", $post_event)[0];
$post_time = explode(" ", $post_event)[1];
with this:
list($post_date, $post_time) = explode(" ", $post_event);
However, using a temporary variable and manually assigning the values is more neater and readable.