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 = "";
$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.";
?>

223 Like 50 Dislike
Previous php-forum Next php-forum
Other php-forum

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

How to create a static html menu from a database
Hi,

I have built a small cms which allows me to create simple html pages and then upload them

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

PHP MySQL Return Results Issue
Hi guys,

I'm running joomla and made a module which is using ajax.
Basically i just have a

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

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

Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

Day of week
I am using PHP version 5.0.5
I have a varaible ($DATE (date format yyyy-mm-dd)) that is being inc

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

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