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

storing video files into mysql in php
hi

i have my video files in my folder ,
i have to store the path of the videos into db an

Tree Menu
Hi guys,

Can anyone help me making a tree navigation system? I have a site where I'm allowin

Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the goin

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

Export hangs
Hi all, please help

I have a Oracle 10.2.0.3.0 database. When I want to query the dba_segmen

Getting Subdomain Name With PHP?
I want to grab the subdomain name with PHP so I can generate database queries.

for example my

SHOW TABLES Help
Hi all

I have the following

Code: [Select]<?php
$sql = "SHOW TABLES&quo

preg_match logical error
Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div cla

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