Just use something like
PHP Code:
$userjointimestamp=date("U",$userinfo[joindate]);
$systemtimestamp=date("U");
$tsdifference=round(($systemtimestamp-$userjointimestamp)/86400);
$tsdifference=$tsdifference+1;
if ($userinfo[posts]>=2) {
$averageposts=round($userinfo[posts]/$tsdifference,2);
$averagecharsperpost=round($postinfo[totalchars]/$postinfo[totalposts]);
} else {
$averageposts="NVT";
$averagecharsperpost="NVT";
}
The only way when you NOW can get an division by zero error, is when the user's posts are deleted, but his postnumber isn't, so it still reads like 22 posts even if he hasn't got any..
But otherwise, it works fine.. for me though