I would like to implement paging in PHP. I have some result set from db, let it be an array.
I need a paging that should display 4 records per page and the page numbers should be of the following 

"<< 1,2,3.....20 >>"

and when you select page 2, then the format should be of the following

"<< 3,4,5.....20 >>"

can you guys suggest me some paging concepts to implement this?