Php日期条件将不为True

Php日期条件将不为True,php,Php,我用这个代码来表示条件,但我不知道为什么条件会变假 <tr <?php if ($LevelName['Status'] == 'Yes') { ?> style="background:#DCFEB7" <?php } ?> <?php elseif (strtotime(date('Y-m-d h:i')) > strtotime($LevelName['ReportTime'])) { ?>

我用这个代码来表示条件,但我不知道为什么条件会变假

<tr
    <?php if ($LevelName['Status'] == 'Yes') { ?>
        style="background:#DCFEB7"
    <?php } ?>
    <?php elseif (strtotime(date('Y-m-d h:i')) > strtotime($LevelName['ReportTime'])) { ?>
        style="background:red"
    <?php } ?>
    <?php else { ?>
        style="background:orange"
    <?php } ?>
>

您可以随时编辑您的帖子,因此您应该编辑帖子并将代码放在那里,而不是放在评论框中。我现在是为你做的,所以你什么都不用做。下一次的提示:-使用time而不是strottimedate'Y-m-d h:i'什么是$LevelName['ReportTime']变量会更容易些?请张贴它的价值。另外,请解释你期望从中得到什么行为。告诉我们一些上下文等。
(Todat Date)392291420 > (DB Date)1392336360