I have this display code for one webpage (have a look at the link Link ) I want to have the more pages thing in a table with 10 results ie pages numbers per row...
how can i edit this code???
echo $post_result;
// Calculate the total number of results.
$total_results = mysql_result(mysql_query("SELECT COUNT($fields) as Num FROM $table where MAIN = 0"),0);
// Calculate the total number of pages. ceil() is used to round the page number to the higher integer.
$total_pages = ceil($total_results / $max_results);
// The real stuff. Creats the Navigation Menu
//Set font style for navigation area
echo "<div class=\"text\"><center>$nav_title<br>";
// Create the Previous link.
if($page > 1){
$prev = ($page - 1);
echo "<a class=\"nav\" href=\"".$_SERVER['PHP_SELF']."?$httpvar=$prev\"><font size=\"1\" face=\"Verdana\" color=\"#000000\">$pre_style</a> ";
}
//Creat the navigation page numbers.
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){ // make sure the link is not given to the page being viewed
echo "$i ";
} else {
echo "<a class=\"nav\" href=\"".$_SERVER['PHP_SELF']."?$httpvar=$i\"><font size=\"1\" face=\"Verdana\" color=\"#000000\">$i</a> ";
}
}
// Create the next link.
if($page < $total_pages){
$next = ($page + 1);
echo "<a class=\"nav\" href=\"".$_SERVER['PHP_SELF']."?$httpvar=$next\"><font size=\"1\" face=\"Verdana\" color=\"#000000\">$next_style</a>";
}
echo "</center></div>";
echo $post_nav;
?>