C
Chris
Guest
here is my code:
while($row = $pagedResults->fetchPagedRow())
{//when $row is false loop terminates
if (!$cstyle=0)
{
?>
<tr class="tr_white">
<td width="40px"><?echo $id[$b];?></td>
<td width="630px"><?echo $name[$b];?></td>
<td width="80px"><?echo $price[$b];?></td>
<td width="10px"><input type="checkbox"></td>
</tr>
<?
$cstyle=0;
}else
{
?>
<tr class="tr_gray">
<td width="40px"><?echo $id[$b];?></td>
<td width="630px"><?echo $name[$b];?></td>
<td width="80px"><?echo $price[$b];?></td>
<td width="10px"><input type="checkbox"></td>
</tr>
<?
$cstyle=1;
}
++$b;
}
only one style is applied even though this works when just using html..
anyone see an obvious mistake here?
thanks
while($row = $pagedResults->fetchPagedRow())
{//when $row is false loop terminates
if (!$cstyle=0)
{
?>
<tr class="tr_white">
<td width="40px"><?echo $id[$b];?></td>
<td width="630px"><?echo $name[$b];?></td>
<td width="80px"><?echo $price[$b];?></td>
<td width="10px"><input type="checkbox"></td>
</tr>
<?
$cstyle=0;
}else
{
?>
<tr class="tr_gray">
<td width="40px"><?echo $id[$b];?></td>
<td width="630px"><?echo $name[$b];?></td>
<td width="80px"><?echo $price[$b];?></td>
<td width="10px"><input type="checkbox"></td>
</tr>
<?
$cstyle=1;
}
++$b;
}
only one style is applied even though this works when just using html..
anyone see an obvious mistake here?
thanks