Help needed improving a foreach loop
<p>I have this logic written that loops out an array into <code>&lt;li&gt;</code></p>

<p>and gives #1 and every 5th a class of "alpha".</p>

<pre><code>$count = 0;

        foreach($gallery-&gt;data as $row){

            if ($count==0 || $count%4==0) {
                echo '&lt;li class="alpha"&gt;&lt;/li&gt;'.PHP_EOL;
            } else {
                echo '&lt;li&gt;&lt;/li&gt;'.PHP_EOL;
            }

            $count++;
        }
</code></pre>

<p>I need to add to this and get the code adding a class of "omega" to every 4th <code>&lt;li&gt;</code></p>
