try this<br><br>function isEven($x){if($x%2==0){return true;}else{return false;}}<br>$oddeven=1;<br><br>
<div><font face="Courier New" size="2">print "<tr class=\"";<br>if(isEven($oddeven){</font><font face="Courier New" size="2">print
</font><font face="Courier New" size="2">"even";}else{</font><font face="Courier New" size="2">print
</font><font face="Courier New" size="2">"odd";})$oddeven++<br>print "\"><td>";</font></div><br><br><br><br><br clear="all">R.A.Smith<br>Manager/Technical Lead<br>Exterbox - "Thinking outside of the box"<br>
<a href="http://www.exterbox.com">http://www.exterbox.com</a><br><a href="mailto:rohan@exterbox.com">rohan@exterbox.com</a><br>1-876-449-7506<br><br>
<br><br><div class="gmail_quote">On Sat, Jun 12, 2010 at 10:06 AM, Neil Coghlan <span dir="ltr"><<a href="mailto:neil@esl-lounge.com">neil@esl-lounge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">I have a custom block showing the users whose
content has attracted most pageviews.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">part of my code is this:</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Courier New" size="2">print "<tr class=\"";<br>print
$zebra;<br>print "\"><td>";</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">this is a drupal 6 installation and I don't
seem to be able to get the odd/even classes I'm looking for. If I put print
"odd", they all come out grey, "even" and they all come out white, so I know the
syntax of the code is fine...I just can't get the zebra variable working.
</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">any tips what I'm failing to do??</font></div>
<div><font face="Arial" size="2"></font> </div><font color="#888888">
<div><font face="Arial" size="2">Neil</font></div></font></div>
<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br>