// ##### GET COMMENTS #####
if (! $k ) { $k=0; }
$comments_query = mysql_query ("SELECT * FROM comments LEFT JOIN users ON comments.user_id = users.user_id WHERE comments.file_id = '" . intval($_GET['id']) . "' ORDER BY comments.added LIMIT $k");
$hepsi_tab="select * from comments";
$hepsi=mysql_query($hepsi_tab);
$toplam=@mysql_num_rows($hepsi);
while ($comment = mysql_fetch_array ($comments_query))
{
$comment['comment'] = stripslashes ($comment['comment']);
$comment['title'] = stripslashes ($comment['title']);
$comment['added'] = date('F d, Y', $comment['added']);
$comments .= $tpl->pull_template ('comment');
$i = 0;
while ($i < $toplam) {$a = $a + 1; 
 
echo "<a href='?k=$i'>[$a]</a>";
$i=$i + 1;}
}
böyle olabilir