I want to have a page with next and previous link as well as the pagination of the pages like 1 2 3 4. How do i placed the results of the query to an array without appending a LIMIT statement to the SQL. What i mean is another method that uses array to display records with pagination. My sql query is so complex that it needs to store the ids to an array. thanks.