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

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

SESSION question
I am building an application , a directory for auctions.
For SEO i made a script which copies a p

values not being entered into table
hi. I;ve created a form, so that when a user enters data into it, it gets added to a table in a data

some questions
Hello,

I am looking for the answers for following questions:

1) Does PHP support overl

LSB (PHP 5.3) problem with static value!
hello,

i'm having a problem. static::$text variable gets lost at some point. can someone plea

division gives infinity anser
int main()
{
int z=0;
int i=1/z;
cout<
}

It doesn't throw a

CHMOD script
Hi,

I need a script to read all files in a folder and set to 777.

Can anyone help out

Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question

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