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

Preventing SQL Injection
I have a question about SQL Injection, In some of our code we use this: view plaincopy to clipboa

quotes changing
hi all

in my content

opening quotes " changes to “

close qu

Working with Global Variables
hi, I'm not really sure why the following code is returning a "Call to a member function getBan

unoconv doc convert to pdf code prob
PHP/5.3.1

Hi. I am trying to use this code to convert docs to .pdf utilizing unoconv. Howe

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

Results from Db outputted twice
Hey guys.. for come reason my data is outputted twise shown in the image below and i cant figure out

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

unexpected T_VARIABLE error
Hey all! I'm getting an unexpected T_VARIABLE with the following function:

function getHighes

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