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

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

Sub-domains & calling unique content
Hello,

Is there a way use something similar to the $_GET function for a sub-domain? I to be a

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

Am I setting up my sites oldschool?
Ok,

When I create a site I open a basic template that I have created that consists of a css f

Recognising Revenue daily
Hello.
Has anyone come across daily recognition of deferred income?
We want to implement R

Concatenate two strings ???
I have string one $string1 and another $string2.

How to concatenate (add) both of them $str

Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and

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

Count of reciepients in php mailer
How can i sent a mail to large no of reciepients say 10,00,00 Using PHP MAILER

Business Health Check
Hello

I need to create an online business health check for a client it will be multiple choi

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