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

Displaying a record from mysql in a simple swf file
Hi,

I have a mysql database containing information I would like to display in my swf.

php wont update my db
hello,

sorry for posting in mysql forum but i dont know where exactly is the problem but here

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

Force download script not handling files with spaces properly
I have a regular old php force download script, uses this code:

Code: header("Cache-Cont

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

New Search Engine
Hey everyone,

I have a ZIP Code Radius search engine already functional. it displays all of t

pagination numbering pattern
Hello,

I have following code which works great for pagination. but i have small issue now.

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

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