query('SELECT name, latitude, longitude, description FROM restaurants'); $restaurants = $stmt->fetchAll(); } catch (PDOException $e) { // For development, you might want to log this error. // For production, you could show a generic error message. error_log('Database error: ' . $e->getMessage()); $restaurants = []; // Ensure restaurants is an empty array on error } ?>