"); echo (""); echo ("$Rij[Description]
"); echo ("

Genre: $Rij[Gname]
"); echo ("Article name: $Rij[Name]
"); echo ("Article description: $Rij[Description]

"); echo (""); echo (""); } // Figure out the total number of results in DB: $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM Articles"),0); // Figure out the total number of pages. Always round up using ceil() $total_pages = ceil($total_results / $max_results); // Build Page Number Hyperlinks echo "
Select a Page
"; // Build Previous Link if($page > 1){ $prev = ($page - 1); echo "< "; } for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "$i "; } else { echo "$i "; } } // Build Next Link if($page < $total_pages){ $next = ($page + 1); echo "Next>>"; } echo "
"; ?>