1. Pagination $display is how many records to show or add per page. $records are the queries that are in SQL. $start is where in the database to start running the script. $rowp is the results of the query. 2. Sorting case is in other words a condition statement. If the case is last name display last name. $order_by tells the code what to sort itself by. Much like in SQL it can be by first name, last name, or ascending, descending order. (echo 'Last name |';) creates a link to sort by. When that link is clicked the records rearrange themselves accordingly.