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

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

set xml path in flash when xml created in memorystream and webrequest
i am creating an xml file using memory stream and i want to load this xml file into the flash on cli

Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..

I need to pull data for clien

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

What's best way to get a user's Word doc converted to simple html and images?
Hi all,

I was just wondering if anybody has any experience of this.
Basically, I'm buildin

How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:

www.site.co

Multi dimensional arrays
If I put in this code:

1
2
3
4
5
6
7
8
9
10
11
12
13<

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