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

DELETE rows based on content
I have a link in my rows

$bit="http://bit.ly/abcd";
$query = mysql_query("D

Login Issue's
Code: <?php
$file = fopen('user.txt', 'r');

/* Set login to false initially */

form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how

problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

SQL Query/echo not working
Hey all,

I'm trying to run (what I thought) was a simple operation and it isn't working. I h

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Serial number of exernal hard disk/Thumbdrive
Hi guys, I am new tio java networking concepts.Please tel me how to get Serial number of exernal

PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

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