tp5 paged data

After completion paginate paging, paging data is generated in the form of an object exists, so that if the data to call paging, such as to modify the value you want to traverse the data, etc. required foreach operation areas, an

Re = Db :: $ -> Table ( 'ldptype_ex') 
             -> Alias ( 'A') 
             -> the paginate (. 5); 
$ $ = Data Re-> Item (); // paged data acquired 
$ total = $ re-> total (); // Get the total number of paging 
$ lastpage = $ re-> last_page ( ); // Get the total number of pages of data paged

  

Guess you like

Origin www.cnblogs.com/dayin1/p/12164771.html