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

Limiting uploaded file type
I am working on a simple upload script, and I need it to limit the allowed file type that is uploade

reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

A WBS element with the name XXX already exists in version FREI_VERSION
Hi.
When I am trying to insert WBS element in a project, error occurs:

"A WBS eleme

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

How would I protect......
I have a from, actually, a good amount of forms. How can I make it so you can't type the characters:

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

Contents of variable not echoing
Hey guys, hopefully this is an easy one...

In this line, the variables are not echoing out. T

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

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