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

$query="SELECT * FROM notify_to_user WHERE user_id=".$_GET['user_id']." ORDER BY id DESC";

$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'],'user_id'=>$r['user_id'],'title'=>$r['title'],'description'=>$r['description'],'image'=>$r['image'],'attachment'=>$r['url'],'status'=>$r['status'],'created_at'=>date('d-m-Y',strtotime($r['created_at']))];
			
			// $cities['images']=$images;
			
			
		}   
		$errors['ibox']=$cities;
		//$errors['product_images']=$images;
		$errors['success']=true;
		$errors['message']='sms data';
    } else {
        
		$errors['success']=false;
		$errors['message']='There is content found';
    }
	echo json_encode($errors);
?>