title: PHP Warning: Division by zero error
body: <p>I getting this error and not sure how to fix it. Line 162 is the first line in the php code. I looked at some of the related questions and all my quote marks seem to be in the right place</p>
  
  <pre><code>Per page:
  &lt;input type=text name=per_page value="&lt;?php echo $en['per_page']; ?&gt;" size=6&gt; 
  Go to page:
  &lt;select name=page size=1&gt;
  
  &lt;?php 
  $pages = ceil(sql_num_rows($result)/$en['per_page']); 
  for ($k=1;$k&lt;=$pages;$k++) 
     echo '&lt;option value='.$k.($en[page] == $k ? ' selected':'').'&gt;'.
       $k.'&lt;/option&gt;';
  
  echo '&lt;/select&gt;';   
  if ($en[page]&lt;$pages) 
     echo '&lt;input type=submit name=next value="Next page"&gt;';
  ?&gt;
  </code></pre>