$jointime = (time() - $post[joindate]) / 86400; // Days Joined if ($jointime < 1) { // User has been a member for less than one day. $postsperday = "$post[posts]"; } else { $postsperday = sprintf("%.2f",($post[posts] / $jointime)); }