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

PHP FTP connect doesn't work with correct login
Hi!

i am working on this test code:
Quote<?php

$ftp_ser

Strange php code found on my website
I got hacked and the following code was placed within my files:

Code: [Select]<?
/*

Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year change

Help with search.php
Hello All

I need the search engine on a site I am building at the moment to display the searc

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess

First root of a number
Hi,

I can't find any function in php to give me the first root of a number.
Is there any

links using header()
Hi All

I'm not sure where to ask for help on this but I hope someone can offer some. I'm at

imap: how to save a copy of sent emails to sent elements
Hello my friends,

I am writing an online emailing application with inbox outbox/sent elements

temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi

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