×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: bejoy balan
Added: Nov 7, 2014 8:42 AM
Views: 27
How to Paginate lines in a foreach loop with PHP
  1.  $limit      =   10;
  2.  $curr_page  =   1;
  3.  
  4.         if(Mage::app()->getRequest()->getParam('p'))
  5.         {
  6.             $curr_page  =   Mage::app()->getRequest()->getParam('p');
  7.         }
  8.         //Calculate Offset  
  9.         $offset     =   ($curr_page - 1) * $limit;
  10.