Explore Restaurants

query('SELECT id, name, description, image_url FROM restaurants ORDER BY name'); $restaurants = $stmt->fetchAll(PDO::FETCH_ASSOC); if (count($restaurants) > 0) { foreach ($restaurants as $restaurant) { echo ''; echo '
'; echo '
'; echo '

' . htmlspecialchars($restaurant['name']) . '

'; echo '

' . htmlspecialchars($restaurant['description']) . '

'; echo '
'; echo '
'; } } else { echo '

No restaurants found.

'; } } catch (PDOException $e) { echo '

Error fetching restaurants. Please try again later.

'; } ?>