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

image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

strptime() equivalent for php4 ?!
Greetings!

this is my first post, thank you in advance for your replies.

Well, the ti

CU&UC guide
Hi Gurus,

can anybody provide me the link for CU&UC upgrade guide

Thanks i

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI

Creation of Raw Exposure manually
SAP Gurus

I am creating Raw Exposure ( Hedge management ) thru T Code TEM10 with followin

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

PHP Session Issue
I'm having an issue with one section on my website dealing with sessions. Now I know that myself and

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