if elseif endif php code example Example: PHP if...else...elseif Statements <?php $t = date("H"); if ($t < "20") { echo "Have a good day!"; } ?>