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

Php If in MySql query (hiding labels if a field is empty)
Okay, I've been trying to do this for a while, and I'm finally going to ask for help so I can get th

Filename like the user name
I am creating a form and storing the values in file. Could anyone please tell me how to write a code

Email Form Syntax Issue
I need the TO: in email to display To: CEO instead of To: abc@mail.com

How to alter the scri

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: [Select]blog:edit_all,delete_all|users:edit_all

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

Taxonomy? Classification? Categorisation?
Not sure if there is a way around this classification problem
I have a supplier who produces

Pipe email to PHP - get mail adress from MySQL - send?
Hi all,

this is the challenge:

1) Our faculty at the college where I'm employed includ

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

Form submissing with PHP and JQuery/Ajax
I have searched everywhere, but cannot find a solution for this... I have worked all day trying to g

CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones

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