获取某个时间戳的周几,以及未来几天以后的周几
$time 代表时间
$i 今天开始
public static function getTimeWeek($time, $i = 0) { $weekarray = array("日", "一", "二", "三", "四", "五", "六"); $oneD = 24 * 60 * 60; return "周" . $weekarray[date("w", $time + $oneD * $i)]; }
以上是详细介绍php根据时间戳获取周几的实例代码的详细内容。更多信息请关注PHP中文网其他相关文章!