title: Serial Number in PHP-MySQL Pagination
body: <p>I am using simple PHP-MySQL pagination and I use serial number for my records. for this purpose I use the following code,</p>
  
  <pre><code>$serial = 1;
  $sql= mysql_query("SELECT * FROM TABLE LIMIT $limit");
  while($row = mysql_fetch_array($sql)) {
  $s_num = $serial++;
  $name = $row['name'];
  echo $s_num . $name."&lt;br&gt;";
  }
  </code></pre>
  
  <p>Now the problem is that the serial number start from 1 in every page in my pagination while i need it from 11-20 in 2nd page, from 21-30 in 3rd page and so on.</p>