Output the dates for the next six Saturdays


SUBMITTED BY: henry1874w

DATE: June 17, 2017, 1:29 p.m.

FORMAT: Text only

SIZE: 274 Bytes

HITS: 248

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. $startdate=strtotime("Saturday");
  6. $enddate=strtotime("+6 weeks", $startdate);
  7. while ($startdate < $enddate) {
  8. echo date("M d", $startdate) . "<br>";
  9. $startdate = strtotime("+1 week", $startdate);
  10. }
  11. ?>
  12. </body>
  13. </html>

comments powered by Disqus