Didn't think you were just gonna copy paste, but I just revised it in an actual file (was just doing it off the fly but here you go)
$cnt= 100; //Set to value in database
$currentpage = 1; // Whatever you wanna use. Use $_GET so it's dynamic.
$current = 1;
$limit = 20; //Or set to other value, or user defined.
while($current <= $cnt)
$thislast = $current + $limit;
if($thislast > $cnt)
$thislast = $cnt;
if($current == ((($currentpage - 1) * 20) + 1))
echo '<p class = "paginationBold">'. $current . ' - ' . $thislast . '</p>';
echo '<a class = "paginationLink" href = "insert url">' . $current . ' - ' . $thislast . '</p>';
$current += $limit; //Added this to update $current. Was missing.