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 = "";
$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

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

Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter

array_combine() error
getting an "Warning: array_combine() [function.array-combine]: Both parameters should have an e

Code doesn't print what i wanted it too. Please help!
Hi there,

I wrote this code to mae it so that in the form before it that the user said their

Help Ordering Arrays
Hi, I have 3 arrays as shown below.

Code: $users = $this->get_latest_users();
$flir

Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i

Perplexing problem showing a .jpg
Please disregard..........I figured it out

Can I call a class inside a function?
I have a class written in another file that handles my image resizing.

Can I do this (php say

Validating time
Hi Guys

what do you think of the following approach to validate a 24hour time:

http://

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

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