Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $start = new DateTime('-7 days', new DateTimeZone('UTC'));
- $period = new DatePeriod($start, new DateInterval('P1D'), 7);
- foreach ($period as $date) {
- echo $date->format('D d-m-Y').'<br>';
- }
Add Comment
Please, Sign In to add comment