for ($i = 0; $i < 10; $i++) {
$row = mysql_fetch_array($query) or break;
// do the thing for the first 10 items here
}
for ($i = 10; $i < 20; $i++) {
$row = mysql_fetch_array($query) or break;
// do the thing for the next 10 items here
}
The for gives you the loops, each one getting 10 rows from mysql_fetch_array. If mysql_fetch_array runs out of rows, the "break" statement will end that loop.
[Edit]
I misread the question. Using "SELECT ... LIMIT ..." is what you want, as suggested by Planetsim.