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

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

read integers that returns a negative or prints the average
Im trying to finish this homework assignment by tommarow afternoon and I keep getting stuck.
Wr

reating a background image
I am building a site in drupal and have a php form in it, due to certain annoyances with module buil

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

Validation
Hello

I know this is a really vag question.

I need to have a input field on a form th

What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a

Access database inside of a validation class
Hello,

For quite some time, I have been using functions to validate form input and access the

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

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