Today is the day of writing PHP-php Tutorial

Source: Internet
Author: User
Today is the day of the week written in PHP. The first method is $ dadate (& quot; w & quot;); if ($ da & quot; 1 & quot;) {& nbsp; & nbsp; echo & quot; today is Monday & quot;} elseif ($ da & quot; 2 & quot;) {& nbsp; echo today is the day of the week written in PHP
// The first method: $ da = date ("w"); if ($ da = "1") {echo "Today is Monday ";} else if ($ da = "2") {echo "Today is Tuesday";} else if ($ da = "3") {echo "Today is Wednesday ";} else if ($ da = "4") {echo "Today is Thursday";} else if ($ da = "5") {echo "Today is Friday ";} else if ($ da = "6") {echo "Today is Saturday";} else if ($ da = "0") {echo "Today is Sunday ";} else {echo "Your input is incorrect !! ";}; // Method 2 $ ga = date (" w "); switch ($ ga) {case 1: echo" Today is Monday "; break; case 2: echo "Today is Tuesday"; break; case 3: echo "Today is Wednesday"; break; case 4: echo "Today is Thursday"; break; case 5: echo "Today is Friday"; break; case 6: echo "Today is Saturday"; break; case 0: echo "Today is Sunday"; break; default: echo "Your input is incorrect! ";}; // Echo" today is the week ". mb_substr (" May 15, 1234 ", date (" w "), 1," UTF-8 ");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.