In my below code when the $artist or $title variables contain " it causes the JavaScript command to break.
Is there another way I can encode these other than addslashes() to fix this?
$artist = addslashes($row['artist']);
$title = addslashes($row['title']);
echo '<div class="play" style="display: inline"><a href="javascript:playSong'."('$artist','$title','$row[file]','$row[id]')".'">