$sn = ($page * $limit) + 1;

$sql = mysql_query(“SELECT * FROM TABLENAME LIMIT “.($page * $limit).”, $limit”);

while($row = mysql_fetch_assoc($sql)) {

$num = $sn ++;

$name = $row[‘name’];

echo $num . $name.”<br>”;

}