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

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

Include ("Absolute Path") of a file?
I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

Display last record first.
I need some help how put the last record first and first record last.

Thanks

Code: &am

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

Not sure why this script is not working?
Hi I am new to php programing and I was trying to make up a simple script like a captcha but I canno

include problem
I have my root folder as:
Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server root<

links using header()
Hi All

I'm not sure where to ask for help on this but I hope someone can offer some. I'm at

Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....

Warning: session_start() [fu

This is driving me nuts!
This insert query looks to be alright, however I get this error:

QuoteYou have an error in yo

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