Pagination Help!!
Posted: Sun Jun 22, 2008 12:15 pm
I have a pagination script here:
Now what i want is
i want to put this codes into table like this :
how can i put those codes into the table above??
Code: Select all
<?
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM wallpapers"),0);
$total_pages = ceil($total_results / $max_wp_results);
echo "<b><strong>";
echo "<center>Pages</br>";
// Build Previous Link
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\";><font color=\"#6699CC\">Previous </font></a>";
}
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i\";>$i</a> ";
}
}
// Build Next Link
if($page < $total_pages){
$next = ($page + 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next\";><font color=\"#6699CC\">Next</font></a>";
}
?>Now what i want is
i want to put this codes into table like this :
Code: Select all
<table border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center" bgcolor="#000000" width="19"><font color="white"><b>1</b></font></td>
<td width="19">2</td>
<td width="19">3</td>
<td width="19">4</td>
<td width="19">5</td>
<td>[next]</td>
</tr>
</table>how can i put those codes into the table above??