whileye sokmadan echo ile bilgi isteyemezsin ki hatan bu :S

Al Sana Güzel Bir örnek Renkli Tag + Sayfalama

Kendine Göre Düzenle

Bende Buradan Almıştım Kodları

<?php
if($_GET['page'])
{
$page = $_GET['page'];
}
else
{
$page = 1;
}
$max = 100;
$cur = (($page * $max) - $max);

$counttotal = mysql_query("SELECT id FROM arama ") or die(mysql_error());      
$counttotal = mysql_num_rows($counttotal);
$total_pages = ceil($counttotal / $max);

$sonuc = mysql_query("SELECT * FROM arama ORDER BY id DESC LIMIT $cur,$max");
while ($oku = mysql_fetch_array($sonuc)){
$baslik = $oku['kelime'];
$sayi = rand(0,4);
$r = rand(0,255);
$g = rand(0,255);
$b = rand(0,255);
$renk = dechex($r) . dechex($g) . dechex($b);
echo "<a  title=".$oku['kelime']." href=tag.php?search=".make_url_friendly($oku['kelime'])."><font color=\"#$renk\" size=\"$sayi\">".$oku['kelime']."</font> ";
} 

if ( $total_pages > 1) 
{
echo "<br />Pages: ";
for($i = 1; $i <= $total_pages; $i++)
                {
            if($page == $i) //
                {
        echo'<b>' . $i .'</b> ';
                } 
        else 
        {
                echo '<a href="?page=' . $i . '">' . $i . '</a> ';
        }
         }
} 

?>