0) { while ($row = mysqli_fetch_assoc($result)) { if(!empty(['salt_id'])){ array_push($data,$row['salt_id']); $count++; } } } $data['count']=$count; error_log("str allergy_items ".print_r($data,true)); echo json_encode($data); ?>