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

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

Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.

But

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Echo-ing MySQL content and Keep Formatting?
I have data in my MySQL such as:

QuoteBlah blah

Blah blah

etc
but when i ech

php global variable
how can we create global variable so we can use its value in any form.. Please give example to

Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato

How to grab certain words ??
I am working with this API

Returns JSON.
curl http://letsbetrends.com/api/current_trends

Simple MySQL script is not working
Hey guys,

Just familiarizing myself with PHP and MySQL. I am following along in the O'Reilly

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