PHP输出周几代码:
$w = date('w'); echo '今天是周'.$w;
运行结果:
今天是周5
输出大写的星期代码
$weekarray=array("日","一","二","三","四","五","六"); //先定义个数组 echo "今天是周".$weekarray[date("w")];
运行结果:
今天是周五
我的微信
我的微信
微信扫一扫
$w = date('w'); echo '今天是周'.$w;
运行结果:
今天是周5
$weekarray=array("日","一","二","三","四","五","六"); //先定义个数组 echo "今天是周".$weekarray[date("w")];
运行结果:
今天是周五
评论