主页
PHP
PHP 日期和时间
tryphp_date7
运行 ❯
×
更改方向
保存代码
更改主题
<!DOCTYPE html> <html> <body> <p>Output the dates for the next six Saturdays:</p> <?php $startdate = strtotime("Saturday"); $enddate = strtotime("+6 weeks", $startdate); while ($startdate < $enddate) { echo date("M d", $startdate) . "<br>"; $startdate = strtotime("+1 week", $startdate); } ?> </body> </html>