php returns the current date or the day of the week for the specified date

WBOY
Release: 2016-07-25 08:44:19
Original
838 people have browsed it
PHP day of the week acquisition code:
  1. date("l"); //Data can get the English day of the week such as Sunday
  2. date("w"); //This can get the numeric day of the week such as 123, note that 0 is Sunday
Copy code
Get the Chinese day of the week:
  1. $weekarray=array("日","一","二","三","四","五","六" ; ","一","二","三","四","五","六");
  2. echo "week".$weekarray[date("w","2011-11-11") ];
Copy code
    php

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template