SWITCH quiz $weekday = date("w"); //Get the day of the week today is one, two, three, four, five, six. Use 0 1 2 3 4 5 6 means
switch($weekday){
case 0:
echo "Sunday: Injury day! ";
break;
case 1:
echo "Monday: Busy day! ";
break;
case 3:
echo "Wednesday: Not dead day! ";
break;
case 4:
echo "Thursday: Death day! ";
break;
case 5:
echo "Friday: Fulai day! ";
break;
case 6:
echo "Saturday: free and easy day! ";
break;
}
?>
The above is an introduction to PHP. Let’s see how my mood changes over the week. It’s quite interesting! It includes some aspects. I hope it will be helpful to friends who are interested in PHP tutorials.