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