You are here: Re: Difference between two dates « All PHP « IT news, forums, messages
Re: Difference between two dates

Posted by Chris B on 05/10/05 22:44

A mate just solved it with this:

$timediff = time() - strtotime($lastonline);
$d = floor(($timediff/86400));
$remainder = $timediff % 86400;
$h = floor(($remainder/3600));
$remainder = $remainder % 3600;
$m = floor(($remainder/60));
$s = $remainder % 60;


where $timediff = what was $time_since_last_activity
and $lastonline = what was $last_activity

He modified your version, but without relying on previous values, so
thanks to you and him.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация