1strtotime("now");
2
3// strtotime is a function that will take a string parameter
4// that specifies a date, and returns a unix time stamp bassed
5// on that
6
7echo strtotime("2020-02-24");
8
9// prints: 1582502400
1
2<?php
3$nextWeek = time() + (7 * 24 * 60 * 60);
4 // 7 days; 24 hours; 60 mins; 60 secs
5echo 'Now: '. date('Y-m-d') ."\n";
6echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n";
7// or using strtotime():
8echo 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."\n";
9?>
10
11