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

Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

Add_Months not Easy to Understand
Oracle is number 1, very fast and very easy. But....
OK, I think but have a problem, only 1 pro

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

PHP Directory Listing Not working
Hey Guys,

I need help, I tried a ton of directory listing scripts and they all don't work. Al

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

Example:
Code: [Select]

highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

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

get font info from a font file
hello,

Does anyone know how to get font info from a font file ... using php of course !
<

onclick problem
I have <input type="text" name="message">
<a href=page2.

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