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

Undefined variables
hi
----------------------------------------------------------------------------------------------

Any meaningful project for a new C++ programmer?
I want to do some meaningful program, so I can help myself to learn

Assume I know the fol

insert quotes
Hi,

I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

Call Screen statement Error
Dear Experts,

is there any setting that needs to be done before creating any dialog progr

How to find OS bit version
How can I tell the person browsing my site is running 32, or 64 bit operating system?

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

Login script (probably a simple error)
dbConfig.php
Code: <?
// Replace the variable values below
// with your specific dat

Extending Exception to contain method name
I was wondering, if there's a way to extend Exception in such a way, that it would contain name of a

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

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