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

insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text whi

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

This is driving me nuts!
This insert query looks to be alright, however I get this error:

QuoteYou have an error in yo

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

Posting to another Site?
I have software that people install.
When they install it, is there a way to make it post their d

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