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

how to remove in php string display
My code is $message="We're looking at developing our website."; $body= "My mess

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when

First root of a number
Hi,

I can't find any function in php to give me the first root of a number.
Is there any

Creating Images from images in PHP
Okay well I am trying to make a 'dynamic' calender image with PHP.

I have images like this:

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

PHP hyperlinks generator - HELP plz
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

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