php获得星期几

$weekarray=array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
$w = date("w",(int)strtotime("2023-05-08"));//0是星期天,1是星期一....
echo $weekarray[$w]

你可能感兴趣的:(php,java,前端)