If the current day is Sunday the code will output "I don't worl."
<?php
$d = date("D");
if ($d == "Sun"){
    echo "I don't work". ".";
} 
?>
If the current hour is less than 20, the code will output "I am going to sleep"
<?php
$t = date("H");
if ($t < "22"){
	echo " I am going to sleep";
}
?>
by Mariam Gelkhauri
2 years ago
PHP
PHP
If Statement
Object Oriented PHP Tutorial
0
Pro tip: use ```triple backticks around text``` to write in code fences