$stmt = $pdo->prepare('SELECT * FROM `15players` WHERE `ClubId`=' . $_GET['ClubId'] . ' ORDER BY `Rating` DESC LIMIT 0, 45 ');
$stmt->execute();
foreach ($stmt as $row) {
$playeravatar = $row['baseId'];
echo "<img class='face16' src=http://packarmy.nl/packs/playeravatars/".$playeravatar."-large.png>";
}
I use this code to get results out of my database, but I want all the results to show in seperate divs. They now display like this:
<div id='player'>
ALL RESULTS
</div>
but I want them to show up like this:
<div id='player'>
result 1
</div>
<div id='player'>
result 2
</div>
Is there anyone who could help me?
Your code is not very very clear for me. this is how i understand your question, u can do like this..
$stmt = $pdo->prepare('SELECT * FROM `15players` WHERE `ClubId`=' . $_GET['ClubId'] . ' ORDER BY `Rating` DESC LIMIT 0, 45 ');
$stmt->execute();
foreach ($stmt as $row) {
$playeravatar = $row['baseId'];
echo "<div class='clsno".$row."'>Your result Result(<img class='whatever _u_want' src='ur_image_link'>)</div>";
}