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

CHMOD script
Hi,

I need a script to read all files in a folder and set to 777.

Can anyone help out

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

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

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.

i have this c

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

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