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

Multiple includes losing variables
Hey all,

just starting out w php and ran into a problem pretty quickly. I'm
including seve

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

query help
Hi experts.

i have a table rep2 like this
PROD_COD ACCT_NO DUE_DAYS BALANCE

Interpret Order
Hello all,

I'm wondering if I have this:

Code: $switch = array(
'one' =>

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a

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