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

Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jp

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

Check Digits and extracting digits
I think I can figure out the code for this but I am having a very hard time getting past the first s

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

Display certain image depending on time of year
Hi, I am new to these forums and would really appreciate some advice on a piece of coding I have don

recrawling
Can anyone suggest me how may i know a page is updated before it is being downloaded, so that i can

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

Google Wave
So... has anyone used it yet? Is it any good?

http://wave.google.com/help/wave/about.html#vid

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