PHP returns the day of the week according to the timestamp _ PHP Tutorial

Source: Internet
Author: User
PHP returns the day of the week according to the timestamp .? Php02 ** 03 * return the day of the week based on the timestamp 04 * @ paramstring $ time timestamp 05 * @ return the day of the Week 06*07 functionweekday ($ time) 08 {09if (is_numeric ($ time) 10 {11 $ we

02 /**

03 * return the day of the week based on the timestamp

04 * @ param string $ time timestamp

05 * @ return day of week

06 */

07 function weekday ($ time)

08 {

09 if (is_numeric ($ time ))

10 {

11 $ weekday = array ('Sunday', 'Monday', 'Tuesday', 'wedday', 'thurs', 'Friday', 'satur ');

12 return $ weekday [date ('W', $ time)];

13}

14 return false;

15}

16 var_dump (weekday ($ _ SERVER ['request _ time']);

17?>


From: zookeeper's blog

Http://www.bkjia.com/PHPjc/478593.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478593.htmlTechArticle? Php 02/** 03 * return the day of the week based on the timestamp 04 * @ param string $ time timestamp 05 * @ return day of the Week 06 */07 function weekday ($ time) 08 {09 if (is_numeric ($ time) 10 {11 $ we...

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.