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

Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in t

square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g

Upload file!
Ok i have a form..
Code: <form name="form1" method="post" action=&quo

Internal Server Error issues
This has been bothering me for weeks and I've been trying to solve it without asking for help, but e

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

wav to mp3 + goDaddy
I need to convert wav files to mp3s. From what I have found so far one way to do it is to have my PH

Online Event Ticket Sales
Has anyone wrote a script for online tickets sales?

I have been googling and found lots of th

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