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

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

Displaying values from a SQL count...
Hi,
Easy enough question i just forget the exact method ..
I have ...

Code: //count win

turning an array into a string then poping it into a db
Hi im just wondering how you get a requested array into a single string then pop it into the db so f

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

socket communication between c++/java and sending image
hi,

i have a class in c++ called win32_sockserver which creates socket to java. i am trying

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