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

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following col

max() problem
I have a while loop to get image names.
Code: $imagequery = mysql_query("SELECT * FROM ad_i

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

Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

Significance of BPM
Hi Experts,
I am a novice in BPM , I just want to know how BPM as permenant department is

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 to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

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