Splitting an array and displaying in parts

Please tell me how to split the mysql_num_rowsarray into 20 elements and display them? I have 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 an array partition by LIMIT 20 and links to display data on the screen?


Answer 1, authority 100%

when composing a request, use the LIMIT construct – it is responsible for the amount of data needed to be issued from the server and also indicates from which position to issue