Manhag Posted November 21, 2012 Share Posted November 21, 2012 hello this code shows time differnce bet 2 times in minutes $to_time = strtotime("2012-12-13 10:42:00"); $from_time = strtotime(now); echo round(abs($to_time - $from_time) / 60,2). " minute"; can it be auto updated ? thanks Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 22, 2012 Share Posted November 22, 2012 Can what be auto updated? Where? Quote Link to comment Share on other sites More sharing options...
requinix Posted November 22, 2012 Share Posted November 22, 2012 Refresh the page. Quote Link to comment Share on other sites More sharing options...
JohnTipperton Posted November 22, 2012 Share Posted November 22, 2012 you need to use AJAX to be able to auto update it try this link http://stackoverflow.com/questions/8197487/javascript-auto-update Quote Link to comment Share on other sites More sharing options...
Manhag Posted November 22, 2012 Author Share Posted November 22, 2012 you need to use AJAX to be able to auto update it try this link http://stackoverflow...ipt-auto-update thanks could u please help me to use that code ?? Quote Link to comment Share on other sites More sharing options...
Christian F. Posted November 23, 2012 Share Posted November 23, 2012 No need to use AJAX, a simple JS interval is enough. Quote Link to comment Share on other sites More sharing options...
JohnTipperton Posted November 27, 2012 Share Posted November 27, 2012 you can also use meta to refresh the page. <meta http-equiv="refresh" content="10"> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.