<?php
include 'connect.php';
$sql="SELECT * FROM a_featured ,a_items  WHERE ItemID_FK=ItemID";
$result=mysqli_query($con,$sql);

if($result){
    $temparray=array();
    while($row=mysqli_fetch_assoc($result)){
        $temparray[]=[
             'item_id'=>$row['ItemID'],
             'item_desc'=>$row['ItemDescription'],
            'description'=>$row['ItemName'],
            'image'=>$row['ItemImage'],
            'show_status'=>$row['ItemShow_status'],
            'out_status'=>$row['ItemOutOfStock_status'],
            'category_id'=>$row['CategoryID_FK'],
            ];
        
    }
    echo json_encode($temparray);
    mysqli_free_result($result);
    mysqli_close($con);
}

?>