Okay, so I am trying to display players usernames and kills and deaths from my highscores page and I have different div classes set for each block This is my code:
<div id="table">
<div class="tr ttl">
<div class="col st1">Rank</div>
<div class="col st2">Username</div>
<div class="col st3">Rating</div>
<div class="col st4">Deaths</div>
<div class="col st5">Kills</div>
</div>
<?php
if($_GET['skill'] == 0) {
$skill = $_GET['skill'];
$page = ($_GET['page']-1);
$limit = RESULTS_PER_PAGE*$page.', '.RESULTS_PER_PAGE;
$limitt = RESULTS_PER_PAGE*$page;
$query = "SELECT * FROM hs ORDER BY `elo` DESC LIMIT ".$limit."";
$result = mysql_query($query);
$counter = 1;
while ($fetch = mysql_fetch_assoc($result)) {
echo '<div class="tr normal ftr rd1">
<div class="col st1">'.($counter+$limitt).'</div>
<div class="col st2"><a href="?user='.$fetch['username'].'">'.$fetch['username'].'</a></div>
<div class="col st3">'.number_format($fetch['kills']).'</div>
<div class="col st4">'.number_format($fetch['deaths']).'</div>
<div class="col st5">'.$fetch['elo'].'</div>
</div>
';
$counter++;
}
}
?>
See where it says echo '<div class="tr normal ftr rd1">
I'd want it to print out like this:
(tr normal ftr rd1) for the first one, (tr normal ftr rd2) for second one and (tr normal ftr rd3) for the 3rd one.
Then (tr normal) and (tr odd normal) for the rest
Can anyone help me out here?