<?php

require_once "config.php";
$sql="select * from hotels";
$query=mysqli_query($con,$sql);
$data=array();
while($result=mysqli_fetch_array($query,MYSQLI_ASSOC)){
    array_push($data,$result);
    
}
echo json_encode(array(
    "data"=>$data
));
?>