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 grab certain words ??
I am working with this API

Returns JSON.
curl http://letsbetrends.com/api/current_trends

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.

H

recrawling
Can anyone suggest me how may i know a page is updated before it is being downloaded, so that i can

temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi

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

Add User script "Could not execute query"
This should be an easy script but I can't get it to run. Can someone please help me?

<

parsing error
can anyone explain this syntax error:

Parse error: syntax error, unexpected T_IF

The e

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