Solved

PHP get current date and add 10 days to it

Posted on 2008-10-10
5
2,287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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 count occurrences of each item in an array.

734 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