The while loop takes care of that. So you could read it like so:
While the 'mysqli_fetch_assoc' has records, keep looping. When it runs out, stop.
Stef
When using the mysql_fetch_assoc function, PHP is literally placing the data from the database into an associative array. Then you loops, you can pull the data out of the array.
Makes sense?
Stefan