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

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

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)&l

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

passthru() help
Hi everyone,
I'm new to the forum and to PHP. I have some pretty good experience writing shell sc

background color imagefill
Hello

I would like to ask you why I see this square in red color just in my local xampp insta

pull content
I have an existing page, domain/adverts.php which has a good PR. I've just rebuilt my site and the n

Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different pl

Remove directories not empty
hi,
i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.<

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

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