<?php
	include_once('includes/config.php'); 
        $cat = $_GET['cat'];
        $num = $_GET['num'];
        $sql = "SELECT * FROM shayari WHERE cat = $cat ORDER BY id DESC LIMIT $num,10";  
        $result = mysqli_query($connect, $sql);  
        $json_array = array();  
        while($row = mysqli_fetch_assoc($result))  
           {  
                $json_array[] = $row;  
           }  
           
        echo json_encode($json_array);  
?>  
 