<?php 

require 'db.php';

$sels = $con->query("select * from cat_banner");
while($rows = $sels->fetch_assoc())
{
        $p['id'] = $rows['id'];
		$p['bannerimg'] = $rows['bimg'];
		$cp[] = $p;
}

echo json_encode($cp);
?>