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

Online Event Ticket Sales
Has anyone wrote a script for online tickets sales?

I have been googling and found lots of th

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

Read from a text file after a specific word
Hi all.

I have a text file that looks like the one below.
I know how to open the text fi

php web service error
hey guys,
I'm working on a project requires the use of web services. I've been trying a few tutor

SAP FICO learning materials
Hi all,
I am new to this world of SAP FICO. I have taken training on SAP FICO, but was wonderin

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

batch file not building to webapps folder
Hello. I just started running Vista :P and can't seem to get my projects deployed. I found out how

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