is there a better, simpler way?
<p>in php, i'm doing a loop, something like like</p>

<pre><code>    $x = 0;

    for ($i = 0; $i &lt; 100; $i++)
    {
        if ($x == 3)    //better way to do this? in this example, determine every 3 times in a loop
        {
            //"do something"
            $x = 0;
        }

        $x++;
</code></pre>

<p>as you can see, i'm doing something in the loop every 3 times it goes around, but the question is, is there a better, simpler way of finding out if it's time for it to "do something" in the loop?</p>
