Reputation:
So I've timestamps:
I have php statement:
if ($eventStarted < $todaysCutoff) continue;
I would expect this statement to show 1 but instead it shows 2. Is this correct, and I'm not understanding something? It acts like break to me now.
<?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;
} ?>
I'm stupid :)
Upvotes: 1
Views: 18393
Reputation: 13558
the continue
keyword is used inside loops like for or while. Either your code does not include the loop or you are "doing it wrong (TM)". :)
http://php.net/manual/en/control-structures.continue.php
Upvotes: 3