Live example of above code.<?
$startDate = "2010-06-02";
$nextDate = strtotime($startDate. "+2 week");
$format = '%Y-%m-%d';
echo strftime($format,$nextDate);
?>
How to get an upcoming date with a preset start date [PHP]
Leave a comment
Live example of above code.<?
$startDate = "2010-06-02";
$nextDate = strtotime($startDate. "+2 week");
$format = '%Y-%m-%d';
echo strftime($format,$nextDate);
?>
Can you just copy this code to anywhere on the page and upload to the site? Or is there more to it than that?
@David yes this code can be used anywhere
are there any common reasons why it wouldn’t work. I pasted the code in between tags and removed the tags. the syntax still looks correct?
@David,
I’m not sure what you mean. Did you past this code and just didn’t work? If so, are you getting any type of error messages?
my last message didn’t look like it was supposed too. It removed my tags.
“are there any common reasons why it wouldn’t work. I pasted the code in between p tags and removed the br tags.”
I don’t get an error message, its just like nothing is there. weird
@David,
If it is blank then there is a syntax error somewhere. If you want to email me the file as an attachment I will look it over for you. My address is chad.ayers@gmail.com
Thank You