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 Link to comment https://forums.phpfreaks.com/topic/271009-show-time-difference-bet-now-and-another-auto-updated/ Share on other sites More sharing options...
Pikachu2000 Posted November 22, 2012 Share Posted November 22, 2012 Can what be auto updated? Where? Link to comment https://forums.phpfreaks.com/topic/271009-show-time-difference-bet-now-and-another-auto-updated/#findComment-1394257 Share on other sites More sharing options...
requinix Posted November 22, 2012 Share Posted November 22, 2012 Refresh the page. Link to comment https://forums.phpfreaks.com/topic/271009-show-time-difference-bet-now-and-another-auto-updated/#findComment-1394267 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 Link to comment https://forums.phpfreaks.com/topic/271009-show-time-difference-bet-now-and-another-auto-updated/#findComment-1394271 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 ?? Link to comment https://forums.phpfreaks.com/topic/271009-show-time-difference-bet-now-and-another-auto-updated/#findComment-1394275 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. Link to comment https://forums.phpfreaks.com/topic/271009-show-time-difference-bet-now-and-another-auto-updated/#findComment-1394550 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"> Link to comment https://forums.phpfreaks.com/topic/271009-show-time-difference-bet-now-and-another-auto-updated/#findComment-1395380 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.