I am getting error in age of users, online time and maximum online time.. Its aprearing like, 14720days,145724hour,545632mints,6826457second, am using code *24 *60 *60 help me what is correct code of it
Online time/age/total online time
Collapse
X
-
well if you have secoonds in $sec variable then you can use it like this
PHP Code:<?php
$year=floor($sec/(365*24*60*60));
$sec=$sec%(365*24*60*60);
$day=floor($sec/(24*60*60));
$sec=$sec%(24*60*60);
$hour=floor($sec/(60*60));
$sec=$sec%(60*60);
$minute=floor($sec/(60));
$sec=$sec%(60);
echo "Time= $year years, $days days, $hour hours, $minute minutes and $sec seconds";
Comment
Comment