title: php $count - Undefined variable:
body: <p>I have this code that I want to insert a div clear class the it reaches the 5th column:</p>
  
  <pre><code>&lt;div class="grid&lt;?php $count++; if ($count == 5) ?&gt;"&gt;  
  &lt;?php if ($count == 5) { $count = 0; echo '&lt;div class="clearit"&gt;&lt;/div&gt;'; } ?&gt;
  </code></pre>
  
  <p>It works but I am getting this error that I want to get rid of:</p>
  
  <pre><code>Notice: Undefined variable: count  in....template/catalog/product/layout.phtml on line 40
  </code></pre>
  
  <p>where line 40 is <code>&lt;div class="grid&lt;?php $count++; if ($count == 5) ?&gt;"&gt;</code></p>
  
  <p>I can't tell where has gone wrong with my limited PHP knowledge </p>