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

OPINIONS WANTED
This is my login page code, and I want your opinion on it please!

Code: // Login ~ CHECKS

Curl timeout breaks script
So im having difficulties with skipping timeout error in curl
my script calls different functions

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

Vertical Alligning - Not working in 1 cell?
<?php

echo "<table id="valign" width="60%" style=

Table Control
Hi Guru's,

I've created a Module pool program, which contains the Table Control.

tell csv import script to ignore blank rows?
Hi i have the below script but i get an error if a row is blank ie a return in the csv file at the e

j1inmis Ouput layout changes
Hi,

Can anybody tell how can j1inmis output layout can be changed so that vendor names ge

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