View Single Post
Old 10-24-2004   #1 (permalink)
BlodoPKNZ
Red Dawn
 
BlodoPKNZ's Avatar
 
Join Date: May 2004
Location: Eastern Europe
Posts: 302

Couple php questions

I just cant seem to figure this one out. Im trying to get mysql results to show up in a table with alternating rows. My code:
PHP Code:
function rowbg() {
static 
$j=1;
if (
$j%!= 0.5) {
echo 
"display_row1";
$j++;
} else {
echo 
"display_row2";
$j++; }

then i do:
PHP Code:
<tr class="<?php rowbg(); ?>">
to make it alternating. However it just returns the first case. Now where is my error?
__________________

Last edited by BlodoPKNZ; 01-10-2005 at 01:31 PM..
BlodoPKNZ is offline