prepare($sql); $stmt->execute($params); $songs = $stmt->fetchAll(); // --- Presentation --- header('Content-Type: application/json'); echo json_encode($songs);