Forum Moderators: coopster
for example: i am generating a table with a do/while loop and displaying user info in this table. works great. however, i have a column that displays the usergroup, which is fine, but several ppl are in the same usergroup. once again fine, but i would just like to see the first instance of this displayed.
so, if my first 3 records are in the "Staff" group i only want to see the first persons record display that, and it be blank for the next 2 ppl.
any advice would be much appreciated.
thanks!
<?php $lastTime = '0';?>
<?php do {?>
<tr bgcolor="#CCCCCC" class="datatext">
<td align="center" bgcolor="#FFFFFF" class="smtitletext"><a href="avail_results.php?<?php echo $keepNone.(($keepNone!="")?"&":"")."sid=".$row_rsRides['ScheduleID']?>"><?php if( $lastTime!= $row_rsRides['Time'] ) echo $row_rsRides['Time']; else echo ' ';?></a></td>
<td align="center" bgcolor="#FFFFFF" class="smtitletext"><?php echo $row_rsRides['Name'];?></td>
<td align="center" bgcolor="#FFFFFF" class="smtitletext"><?php echo $row_rsRides['Weight'];?></td>
<td align="center" bgcolor="#FFFFFF" class="smtitletext"><?php echo $row_rsRides['Height'];?></td>
<td align="center" bgcolor="#FFFFFF" class="smtitletext"><?php echo $row_rsRides['PhoneNo'];?></td>
<td align="center" bgcolor="#FFFFFF" class="smtitletext"><?php echo $row_rsRides['NumAdults'];?></td>
<td align="center" bgcolor="#FFFFFF" class="smtitletext"><?php echo $row_rsRides['NumChildren'];?></td>
</tr>
<?php $lastTime = $row_rsRides['Time'];?>
<?php } while ($row_rsRides = mysql_fetch_assoc($rsRides));?>
took me awhile but i think this will work... =)