<?php 

require 'db.php';
$cp = array();
$sels = $con->query("SELECT 
assist_details.name,
assist_details.deli_code,
business_zone.zone_code
FROM assist_settings
INNER JOIN assist_details ON
assist_settings.deli_code = assist_details.deli_code
INNER JOIN business_zone ON
assist_settings.delivery_zone = business_zone.id
WHERE assist_settings.status = '1' and assist_settings.delivery_status = '1'");
while($rows = $sels->fetch_assoc())
{
    $p['name'] = $rows['name'];
	$p['deli_code'] = $rows['deli_code'];
	$p['zone_code'] = $rows['zone_code'];
	$cp[] = $p;
}

echo json_encode($cp);
?>