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

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

Memory Allocation
Hi folks,
see this ex:

int v=5;
v=v+10;

then what will do the compiler before th

Display the user's weight lost in the past week
Hello everyone,

I am working on a weight loss app for my site, and I want to display the user

Security Exception on pages using AJAX
I am getting the exception: attempted to perform an operation not allowed by the security policy on

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

Quick fix: Conditional statement with an array
Hi, I'm getting the temperature value off of the Environment Canada website along with the icon file

Upload file!
Ok i have a form..
Code: <form name="form1" method="post" action=&quo

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