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

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the

limitations on array_unique()
Does any one know what/how imitations are applied to array_unique? I have an issue where no matter h

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this

Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

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