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

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

UDP Multicast question
Hey,

Im not really in the know when it comes to network related programming and activitie

an interesting question
Greetings folks, got to ask an interesting question...

let say
i have created a function s

PHP page is blank
Hi Everyone,

I have a site in which I am able to open the first PHP webpage in my browser but

default SAP userid
hi,, I just like to know if it is ok to use the default SAP user id (SAP*)?

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

Pagination
Okay here is the page in question: http://blenderteachings.000a.biz/tutorials.hamishhill.php

Cursor statement failed with errors
Following statement failed with the errors.

cursor proj_cursor1 is (select projectID from

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