$weekarray=array("日","一","二","三","四","五","六"); //先定义一个数组 今天是 <?=date("m-d")?> 星期<?=$weekarray[date("w",time())]?> function get_week($a){ $weekarray=array("日","一","二","三","四","五","六"); return "星期".$weekarray[date("w",strtotime($a))]; }
以上就是PHP获取当前日期的星期的详细内容,更多关于PHP获取当前日期的星期的资料请关注九品源码其它相关文章!