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 do I know when getBounds Method is ready to be called.
I have an application that changes out stylesheets client side. Once I change stylesheet the browse

Warning: Cannot modify header information - headers already sent by (output sta
Warning: Cannot modify header information - headers already sent by (output started at /home/praylif

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to a

HeaderSelectedCssClass not working
I have an accordian where I have a drop down list in the first pane and a grid in the second pane.

RadioButtonList data selection
view plaincopy to clipboardprint?

how to get IP address?
hey guys,

i have this code which is supposed to get me the IP address of my site visitors:

Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

problems with script
I made a small script wich exchanges points in my website:


<?php
session_start

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