Use a for or while loop, where you have an integer variable that is increased by 1 each time a record is displayed and have the loop stop at 25 or whatever number you choose. Then to build the Page: 1, 2, etc links, pass a variable ($start or something) which tells what the initial value of the integer value should be, and have the loop stop at said value + 25. There are MySQL functions to either move the pointer to the $start variable, or where you can pass the $start as a row number to get the value of whatever column in that row.
Hopefully I didn't word that too confusingly. 🙂