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

PHP error (line 38) my website
Hello everyone, I'm new on this
and I got a web site thats got a error not showing the photos on<

Generate PDF
Hi guys,

I would like to know if there is a way to generate pdf when clicking on a link. In f

I would like "for" to wait 5 sec
I would like my 'for' loop to wait 5 sec before second iteration.


for ($i=0; $i<10

pagination numbering pattern
Hello,

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

cyrillic string conversion question
Hello,

First time here...

I would like to know if there is a way to convert a

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

Embed Video Problem
Hey, thanks for looking!

File to be embedded:

Code: <playlist version="1&q

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Snapshot from video
anyone knw how to make a snapshot maker from avi n mkv format.
for example if i give a direct lin

Help with explandable category tree
I have the below query:

SELECT l1.id as lev1_id,l2.id as lev2_id,l3.id as lev3_id,l1.categ

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