利用php顯示日期

<問題>想要利用php顯示上周一的日期(例如: 2013-09-30)
<解答>

一堆日期示範(真的是太強了^^), 如下: <?php function d($t) { echo date('Y-m-d', $t); } echo d(strtotime('yesterday')), nl2br("\r\n"); echo d(strtotime('today')), nl2br("\n"); echo d(strtotime('now')), nl2br("\n"); echo d(strtotime('tomorrow')), nl2br("\n"); echo d(strtotime("last Monday")), nl2br("\n"); echo d(strtotime('Monday')), nl2br("\n"); echo d(strtotime('this Monday')), nl2br("\n"); echo d(strtotime('Monday this week')), nl2br("\n"); echo d(strtotime("10 September 2000")), nl2br("\n"); echo d(strtotime("+1 day")), nl2br("\n"); echo d(strtotime("+1 week")), nl2br("\n"); echo d(strtotime("+1 week 2 days 4 hours 2 seconds")), nl2br("\n"); echo d(strtotime("next Thursday")), nl2br("\n"); echo d(strtotime("Thursday next week")), nl2br("\n"); ?> 
<參攷>用 PHP 抓取下星期二的 Timestamp - strtotime()

留言