title: pagination in zend framework 1.1
body: <p>am trying to do pagination using zend framework 1.1 and cant make it work.i have looked at diffrent tutorials but its so out of this world for me..here is my controller:</p>
  
  <pre><code>public function indexAction()
  {
    $db=new Application_Model_DbTable_Database();
    $sql=$db-&gt;fetch_records();
  
  
    $paginator=new Zend_Paginator(new  Zend_Paginator_Adapter_Array($sql));
    $paginator-&gt;setItemCountPerPage(3);
    $paginator-&gt;setCurrentPageNumber($this-&gt;_getParam('page',1));
    $this-&gt;view-&gt;paginator=$paginator;
  }
  </code></pre>
  
  <p>then i have this view script:</p>
  
  <pre><code>foreach($this-&gt;paginator as $book) 
  {
       echo $book['firstname'].''.$book['lastname'];
       echo "&lt;br&gt;";
   }
  
   echo $this-&gt;paginationcontrol($this-&gt;paginator,'Sliding','pagination.phtml');
  </code></pre>
  
  <p>I'm able to see the first 3 records but when I add the pagination control I get an error. The pagination.phtml file is located inside the scripts directory The error I get is</p>
  
  <pre><code>an error just occurred, application error
  </code></pre>
  
  <p>What am i doing wrong?</p>