hya all i am getting the error in pic included in this post and i dont know what i could be i have found the following bit of code included below
<tr>
<td><?php echo date_diff($lastlogin['lastlogin']);?></td>
</tr>
then i have found the file where the coding for this sits see below
// Date difference function
if(! function_exists(date_diff) )
{
function date_diff($start, $end="NOW")
{
$sdate = strtotime($start);
$edate = strtotime($end);
$time = $edate - $sdate;
if($time>=0 && $time<=59) {
// Seconds
$timeshift = $time.' seconds ';
} elseif($time>=60 && $time<=3599) {
// Minutes + Seconds
$pmin = ($edate - $sdate) / 60;
$premin = explode('.', $pmin);
$presec = $pmin-$premin[0];
$sec = $presec*60;
//$timeshift = $premin[0].' min '.round($sec,0).' sec ';
$timeshift = $premin[0].' minutes ';
} elseif($time>=3600 && $time<=86399) {
// Hours + Minutes
$phour = ($edate - $sdate) / 3600;
$prehour = explode('.',$phour);
$premin = $phour-$prehour[0];
$min = explode('.',$premin*60);
$presec = '0.'.$min[1];
$sec = $presec*60;
//$timeshift = $prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec ';
$timeshift = $prehour[0].' hours ';
} elseif($time>=86400) {
// Days + Hours + Minutes
$pday = ($edate - $sdate) / 86400;
$preday = explode('.',$pday);
$phour = $pday-$preday[0];
$prehour = explode('.',$phour*24);
$premin = ($phour*24)-$prehour[0];
$min = explode('.',$premin*60);
$presec = '0.'.$min[1];
$sec = $presec*60;
//$timeshift = $preday[0].' days '.$prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec ';
$timeshift = $preday[0].' days ';
}
return $timeshift;
}
}
Can anyone tell me what i could be whats causing the error