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

Need Help with a query
Hello,
For some reason I am just not getting the right answer when I do this query and not quite

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

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

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

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

Get content from table into a list, without repeating.
Alright this is kinda an odd thing, so I need some help.

I have a table "quote" wit

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

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