Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,900 questions

51,831 answers

573 users

How to get the date of the next few days in PHP

1 Answer

0 votes
$next7Days = time() + (7 * 24 * 60 * 60);
   
echo 'Now:       '. date('Y-m-d') ."<br />";
echo 'Next 7 Days Date: '. date('Y-m-d', $next7Days) . "<br />";


/*
run:

Now: 2016-03-24
Next 7 Days Date: 2016-03-31
                           
*/

 



answered Mar 24, 2016 by avibootz

Related questions

2 answers 341 views
1 answer 118 views
118 views asked Mar 24, 2022 by avibootz
1 answer 117 views
1 answer 100 views
1 answer 153 views
153 views asked May 11, 2022 by avibootz
...