prepare($query); $sth->execute(); $data = array(); $firstsong = true; while ( $row = $sth->fetch() ) { $id = $row['id']; $song = new Song($row['songid']); echo "
\n"; echo " {$song->getTitle(HTMLSAFE)}
\n"; echo " {$song->getArtist(HTMLSAFE)}
\n"; echo " {$song->getAlbum(HTMLSAFE)}