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