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 help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 p

RSS feed - FeedList for WordPress
Hi,

I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

links using header()
Hi All

I'm not sure where to ask for help on this but I hope someone can offer some. I'm at

PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 200

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

selection tool on raster image
Hi!
I have to implement in my app a selection tool which lets users to select region of any shape

PHP form help required
Hi all! Apologies in advance for having to message the forum for help. I know you must get a lot of

Passing PHP variables from one page to another
Hello-

I'm having trouble figuring out how to transport a variable from one php file to anoth

Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I

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