samedi 23 décembre 2017

I would like to make some code which has an if statement that uses some code on say Sunday to Wednesday and other code Thursday to Saturday

I'm really new to PHP, but I would like to make some code which has an if statement that uses some code on say Sunday to Wednesday and other code Thursday to Saturday.

This is what I am starting with

<?php
$t = date("H");

if ($t < "20") {
    echo "Have a good day!";
} else {
    echo "Have a good night!";
}
?>

Aucun commentaire:

Enregistrer un commentaire