<?php
include 'connect.php';
$sql="SELECT *FROM a_categories";
$result=mysqli_query($con,$sql);
if($result){
    $temparray=array();
    while($row=mysqli_fetch_assoc($result)){
        $temparray[]=[
            'Category_id'=>$row["CategoryID"],
            'Category_name'=>$row["CategoryName"],
            'Category_image'=>$row['CategoryImage'],
            'Category_color'=>$row['CategoryColor'],
            ];
    }
     echo json_encode($temparray);
     mysqli_free_result($result);
     mysqli_close($con);
}
?>