如何使用PHP获得所选日期的一周?
问题描述:
可能重复:
如何在php中查找星期几
我想得到所选日期的星期几。例如05/19/2011 = 星期四
I want to get the day of the week of the selected date. For example 05/19/2011 = Thursday
答
>当前时间:
Here's how to do it for the current time:
$day=strftime("%A",time());
或在特定日期:
$day=strftime("%A",strtotime("2011-05-19"));