Hello first all my brother thanks how help me.
my question
I am made a file.
domo
Name : ramzan
Total day : 160.
joine date : 13 / 6 / 2012
Expire Day Left : Show day daily less 1. i am show daily 1 day less and show 159. next day 158. and next day 157
how can solve script please help
Thanks again
try the below code . Not sure whether this help. I just wrote but didn’t tested it :
[php] <?php
$test=160;
$date1 = “2012-01-10”;
$date2 = date(‘Y-m-d’);
$diff = abs(strtotime($date2) - strtotime($date1));
$days = floor($diff/(606024));
$test= $test - $days;
echo $test;
?>[/php]
$date1=2012-06-13
thanks je thanks this is good work i am try my web site thanks
www.phphelp.com is good and his members is best. i like www.phphelp.com and his members
thanks
i am change with time
for example
day expire 160
my date correct is 13-06-2012 7.34 pm
next day when 14-06-2012 7.34 pm then show day 159
and next day …
Yes, I understood your question. The same script should work as you expected. May be its not working because of timezone. Use the below code in the beginning of the script. [php]
date_default_timezone_set(‘Asia/Kolkata’);[/php]