<?php
include 'connect.php';
$sql="SELECT*FROM a_items WHERE ItemShow_status=1";
$result=mysqli_query($con,$sql);
if($result){
    $temparray=array();
    while($row=mysqli_fetch_assoc($result)){
        $temparray[]=[
            'item_id'=>$row['ItemID'],
            'description'=>$row['ItemName'],
            'item_desc'=>$row['ItemDescription'],
            'image'=>$row['ItemImage'],
            'show_status'=>$row['ItemShow_status'],
            'out_status'=>$row['ItemOutOfStock_status'],
            'promotion'=>$row['Promotion'],
            'category_id'=>$row['CategoryID_FK'],
            ];
    }
    echo json_encode($temparray);
    mysqli_free_result($result);
    mysqli_close($con);

}
?>