最新消息: 新版网站上线了!!!

php获取星期几

function getweek($time) {
    $time = strtotime($time);
    $weekarray=array("日","一","二","三","四","五","六");
	$week = $weekarray[date('w',$time)];
	if($week=='日') {
    return "周".$weekarray[date('w',$time)]."";
	} elseif($week=='六') {
	return "周".$weekarray[date('w',$time)]."";	
	}  else {
	 return "周".$weekarray[date('w',$time)];	
	}
}
echo getweek('2014-11-26');

转载请注明:谷谷点程序 » php获取星期几