php返回当前日期或者指定日期是周几
本文给大家分享的是几个日期函数的格式化方法,十分的简单实用,有需要的小伙伴可以参考下。
PHP星期几获取代码:
代码如下:
date("l"); //data就可以获取英文的星期比如Sunday
date("w"); //这个可以获取数字星期比如123,注意0是星期日
获取中文星期几:
代码如下:
$weekarray=array("日","一","二","三","四","五","六"); //先定义一个数组
echo "星期".$weekarray[date("w")];
获取指定日期是:
代码如下:
$weekarray=array("日","一","二","三","四","五","六");
echo "星期".$weekarray[date("w","2011-11-11")];
以上所述就是本文赌钱不内容了,希望大家能够喜欢。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.