<?php
require_once 'config.php';
//$error=false;
$errors=array();
$cities=array();

$query='SELECT a.*,b.name FROM malls a, countries b where a.country_id=b.id';// WHERE id='.$_GET['banner_id'];

$row = mysqli_query($con,$query);
     
    if (mysqli_num_rows($row) >= 1) {
		//$r=mysqli_fetch_array($row)	;
			
		 while($r=mysqli_fetch_array($row)){
			 
			$cities[]=['id'=>$r['id'],'mall_name'=>$r['mall_name'],'image'=>$r['image'],'country'=>$r['name']];
			
			// $cities['images']=$images;
			
			
		}   
		$errors['malls']=$cities;
		//$errors['product_images']=$images;
		$errors['success']='Malls data';
    } else {
        
		$errors['success']='There is no Malls found';
    }
	echo json_encode($errors);
?>