Applying different CSS to top 10 results of a query

introxturn

New Member
The table below prints of the results of a query called $sqlStr3. It works fine. The query is set to return the top 25 results. I would like to apply a unique CSS class (called "class1" for purposes of this question) to the top ten results in the query. How can I do this?Thanks in advance,John\[code\]$result = mysql_query($sqlStr3);$count = 1; $arr = array();echo "<table class=\"samplesrec1edit\">"; while ($row = mysql_fetch_array($result)) { echo '<tr>'; echo '<td class="sitename1edit2a">'.$count++.'.</td>'; echo '<td class="sitename1edit1"><a href="http://www...com/../members/index.php?profile='.$row["username"].'">'.stripslashes($row["username"]).'</a></td>'; echo '<td class="sitename1edit2">'.number_format(($row["totalScore2"])).'</td>'; echo '</tr>'; } echo "</table>";\[/code\]
 
Back
Top