0
if(!empty($maintenance_options['disable'])) {
    $currentDate = date("Y-m-d H:i:s", strtotime(date("Y-m-d") . date("H:i:s")));
    $nodate = $maintenance_options['disable'], strtotime(date("Y-m-d") . date("H:i:s"));

    if($currentDate > $nodate) {
        echo 'if';
    } else {
        echo 'else';
    }
}

I have this weird error:

Parse error: syntax error, unexpected ',' on line 53

Line 53 is

$nodate = $maintenance_options['disable'], strtotime(date("Y-m-d") . date("H:i:s"));

but that line seems to be fine? What's wrong with it?

J. Doe
  • 503
  • 1
  • 6
  • 19

1 Answers1

0

The question was a bit hard to understand, but I think I know what's being asked. It appears that $currentDate needs to be the current PHP time and $nodate needs to be set to the time value of $maintenance_options['disable']. If this is true, the following code should work.

$currentDate = time();
$nodate = strtotime($maintenance_options['disable']);
Nick
  • 16,066
  • 3
  • 16
  • 32