Tell me, please, how to break the array of mysql_num_rows
into 20 elements and display them? I have a code
if ($_GET["id_cat"] != "") { $cat_1 = str_replace(",", " OR categ_id=", $_GET['id_cat']); $zapros = " (categ_id=$cat_1)"; if ($_GET["id_gor"] != "") { $zapros .= " and gorod=$_GET[id_gor]"; } $ath = mysql_query("SELECT * FROM garant_object WHERE $zapros"); } else { if ($_GET["id_gor"] != "") { $zapros .= "WHERE gorod=$_GET[id_gor]"; } $cat_1 = str_replace(",", " OR categ_id=", $_GET['id_cat']); $ath = mysql_query("SELECT * FROM garant_object $zapros "); }
How to organize a partition of the array for LIMIT 20 and links to display data on the screen?