in reply to exiting a if loop

Several of the last few posts assign both true and false to $check. The original statement in the question does not.

Turnsteps post is the last one that got it right, but if you want to use the ternary operator then this does it:

$check = HISTORY || $time <= 1800 ? TRUE : $check;

Nuance