<?php
session_start();

// Fetch the recipe items from the session
$food_items = isset($_SESSION['food_items']) ? $_SESSION['food_items'] : [];

// Re-index the array to ensure proper JSON structure
$food_items = array_values($food_items);

// Return the recipe items as JSON
echo json_encode($food_items);
?>
