title: I want a pagination to my options page of wordpress plugin?
body: <p><a href="http://jsfiddle.net/vNaqR/16/" rel="noreferrer">MY DEMO</a></p>
  
  <p>I want a pagination according to the results coming from wordpress database...This is all done on my options page of wordpress plugin..</p>
  
  <p>My code to retrieve from database is as follows </p>
  
  <pre><code>$per_page=5;
  $sql = "SELECT * FROM wp_dive ";
  $result = $wpdb-&gt;get_results($sql_10) or die(mysql_error());
  $length=count($result);
  $pages = ceil($length/$per_page);
  foreach( $result as $results ) 
  
      {
      $id=$results-&gt;id;
      $name= $results-&gt;name_cust;
      $gender= $results-&gt;gender_cust;
      $dob= $results-&gt;dob_cust;
  
  &lt;?php $html= "&lt;div class=\"divContentBody\"&gt;";?&gt;
  &lt;?php $html .= "&lt;span class=\"clsOrderNo\"&gt;". $id."&lt;/span&gt;";?&gt;
  &lt;?php $html .= "&lt;span class=\"clsName\"&gt;". $name."&lt;/span&gt;";?&gt;
  &lt;?php $html .= "&lt;span class=\"clsGender\"&gt;".$gender."&lt;/span&gt;";?&gt;
  &lt;?php $html .= "&lt;span class=\"clsDOB\"&gt;".  $dob ."&lt;/span&gt;";?&gt;
  &lt;?php $html .= "&lt;/div&gt;"?&gt;
  &lt;?php
  $data_html .=$html; 
   }
  
   ?&gt; 
  </code></pre>
  
  <p>I m getting the data dynamically ..I just want to add pagination ..to show 5 entries on first page and accordingly ...</p>