Solved

PHP get current date and add 10 days to it

Posted on 2008-10-10
5
2,277 Views
Last Modified: 2012-06-27
I need a simple php script that will get the current date, add 10 days to it, and then print it out in the format:

Day (Ex. Tuesday), MM/DD/YYYY

This is relatively simple but I don't know what to do if the current date is Oct 26 and not print out something dumb like Oct 36

Thanks in advance
0
Comment
Question by:Doomtomb
  • 2
  • 2
5 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 250 total points
ID: 22689111
echo date('m/d/Y',strtotime("+10 days"));
0
 

Author Closing Comment

by:Doomtomb
ID: 31505118
Didn't know it was that easy! Thanks for the fast response.
0
 
LVL 1

Expert Comment

by:jarospirit
ID: 22689159
small modification

      echo date('l, m/d/Y',strtotime("+10 days"));
0
 

Author Comment

by:Doomtomb
ID: 22689176
:X I already assigned the points >_<

but thanks for getting me the exact code for what I asked :) Attention to detail.
0
 
LVL 82

Expert Comment

by:hielo
ID: 22689182
you are welcome.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to dynamically set the form action using jQuery.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now