Hello,
I have this alternate-row-color snippet:
<?php
$SSAdv_colors1 = array("#EEEEEE","#FFFFFF");
$SSAdv_k1 = 0;
$SSAdv_m1 = 0;
$SSAdv_change_every1 = 1;
?>
...and I used it like this:
<tr bgcolor="<?php if($SSAdv_m1%$SSAdv_change_every1==0 && $SSAdv_m1>0){$SSAdv_k1++;}print $SSAdv_colors1[$SSAdv_k1%count($SSAdv_colors1)];$SSAdv_m1++;?>">
...now I need to integrate it into this if..else statement, but it will not work
<?php
$i = 0;
echo '<tr bgcolor="if($SSAdv_m1%$SSAdv_change_every1==0 && $SSAdv_m1>0){$SSAdv_k1++;}print $SSAdv_colors1[$SSAdv_k1%count($SSAdv_colors1)];$SSAdv_m1++;">';
while($row_result = mysql_fetch_assoc($result)) {
if ($i && $i % 5 == 0)
echo '</tr><tr class="break">';
else if ($i)
echo '</tr><tr>';
++$i;
// echo the tds and their data......
Can anybody point out what I'm doing wrong?
Thanks and all the best
Tom