How to calculate days from variable date?


Posted on 16th Feb 2014 07:03 pm by admin

This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:

Code: <?php
$mydate = "";
Did you know?Explore Trending and Topic pages for more stories like this.
$daysaway = 400;
$startdate = "5/5/2005";

//I need how to get the date that was 400 days ago

print "$mydate was $daysaway days from $startdate.";
?>
No comments posted yet

Your Answer:

Login to answer
223 Like 50 Dislike
Previous forums Next forums
Other forums

Redistributing dependent dlls
Hai all ,

I have created an application in VC++ using VS2008 in a development machine which r

Getting PHP to ammended the selected in option field
Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

Extra fields in main body and php required.
I'm new to PHP so please be gentle. I have a little php script below that works well.
The &quo

Displaying data from MySql a different way
Hi all,
I'm pretty new to php and MySql and have hit a problem.

I am able to display data

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

Onclick problem in Firefox
Hi,
I am using a . It doesn't seem to

More pug propaganda.
http://www.youtube.com/watch?v=8Kkrmubsgf8

The commercial is definitely worth watching pug aw

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash