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

IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying

Problem with passing variables
I'm not really a php programmer so I'm really struggling with this issue.

I have a banner s

Upload file!
Ok i have a form..
Code: <form name="form1" method="post" action=&quo

Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.

So this would write 2232 a

SCRIPT ERROR
Here is the CONTACT FORM I made for our website:

<form id="form1" name="

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Parse XML
Good day,

I use oempro software and try to parse XMLReturn but it's not working for me, simpl

switch form actions? not working
i want on submit to go to different pages according to the CatID

Code: <?php $CatID=$_

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

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