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

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

please help
HTML Code:

Code: <span id="ctl00"><span>

Using CSS to format MySQL query
Hi,

If i want to have a news page on my site, which displays all records of a table in descen

Check Digits and extracting digits
I think I can figure out the code for this but I am having a very hard time getting past the first s

order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea

form problem
below in the form action, i've put "test.php?w=$sw&h=$sh" but when i input the for

How to change www in url with a specified name
Hi
I'm trying to change the url http://www.sitename.com/apparels to something like below
http:

Simple AND question
Hello,

I've got following code:

Code: if(strpos($row[13],"http://")

Auto fill in input value based on User_ID
Hello,

I'm looking form some input on the following problem.

User loads page ->

Access database inside of a validation class
Hello,

For quite some time, I have been using functions to validate form input and access the

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