所以我有时间戳:
我有php声明:
if ($eventStarted < $todaysCutoff) continue;我希望这句话能显示1,但它却显示了2,这是正确的,而且我不理解什么?对我来说就像休息一样。
<?php
if (tribe_is_day()) {
$eventStarted = strtotime(tribe_get_start_date(null, false, 'Y-m-d H:i:s'));
$eventEnded = strtotime(tribe_get_end_date(null, false, 'Y-m-d H:i:s'));
$todaysCutoff = strtotime($current_url_date . ' 06:00:00');
echo ' Start: ' . $eventStarted . ' Cutoff: ' . $todaysCutoff . ' End: ' . $eventEnded;
if ($eventStarted < $todaysCutoff) continue;
} ?>我很蠢:)
发布于 2012-11-26 13:40:43
continue关键字在循环中使用,如for或while。要么您的代码不包括循环,要么您“做错了(TM)”。:)
http://php.net/manual/en/control-structures.continue.php
https://stackoverflow.com/questions/13566009
复制相似问题