Hi all I am using the while function to echo out 6 records from database and I am wondering which is the best way to use the while function. I use the while function like this:
while($games_action_data=@mysql_fetch_array($games_action_result)){
?>
<?php echo "<div class=\"games-box-container\">".$games_action_data['g_id']."</div>"; } ?>
Above im just showing the start of the while and then how i use the echo to get the data out. Whats doing my headin is the fact that my html from this while is coming out as one big line and not on separate lines like:
<div class="games-box-container">1</div><div class="games-box-container">2</div><div class="games-box-container">3</div><div class="games-box-container">4</div><div class="games-box-container">5</div><div class="games-box-container">6</div>
I know it dont really matter much i just want to make sure im doing it the right way before i carry on. Thanks.