title: PHP While - Color change every time
body: <p>I have a PHP while loop, which displays the content of a database, in a table.
  I would like to make all the rows in the table different colors.</p>
  
  <p>But not just random. I would like them have different shades of red, where the first row is most red, and then the rest fades into a lighter red.</p>
  
  <p>As an exemple, I would like the same effect as the iPhone App: Clear.
  Photo example: <a href="http://www.realmacsoftware.com/_resources/clear/images/ss_pinch.png" rel="nofollow noreferrer">http://www.realmacsoftware.com/_resources/clear/images/ss_pinch.png</a></p>
  
  <p>I've tried to make the effect with -nth in CSS and some jQuery, but just couldn't figure it out. I hope you will give it a try.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;table&gt;
  
  
  &lt;tr&gt;
  &lt;td align="center"&gt;&lt;strong&gt;Navn:&lt;/strong&gt;&lt;/td&gt;
  &lt;td align="center"&gt;&lt;strong&gt;Spørgsmål:&lt;/strong&gt;&lt;/td&gt;
  &lt;td align="center"&gt;&lt;strong&gt;Tid:&lt;/strong&gt;&lt;/td&gt;
  
  &lt;/tr&gt;
  &lt;?php
  while($rows=mysql_fetch_array($result)){
  ?&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;? echo $rows['name']; ?&gt;&lt;/td&gt;
  &lt;td&gt;&lt;? echo $rows['ask']; ?&gt;&lt;/td&gt;
  &lt;td&gt;&lt;? echo $rows['time']; ?&gt;&lt;/td&gt;
  
  
  &lt;?php
  }
  ?&gt;
  
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>