<?php
include "db.php";

$menu_id=$_GET['menu_id'];

$result=$conn->query("SELECT * FROM radio_ads WHERE menu_id='$menu_id' AND status=1");

$ads=[];

while($row=$result->fetch_assoc()){
$ads[]=$row;
}

echo json_encode($ads);