PHP: Minutes ago, seconds ago: is this correct coded?
<pre><code>if($timestamp &gt; time() - 60){
    // Count seconds ago
    $deff = time() - $timestamp;
    $seconds = $deff / 60;
    echo intval($seconds)." seconds ago";
} elseif($timestamp &gt; time() - 3600){
    // Count minutes ago
    $deff = time() - $timestamp;
    $minuts = $deff / 60;
    echo intval($minuts)." minutes ago";
}
</code></pre>

<p>I think the minutes ago is right, but not the seconds? How should i do the "seconds ago" right?</p>
