Either way, i figured a preg_replace function would work, or maybe trim? So I tried trim, to no avail. Currently i have this code:
$gamelist = preg_replace('/[\x00-\x1F\x80-\x9F]/u', '', $row['favoritegamelist']);
var mygames = document.getElementById("favoriteGamesDiv").innerHTML;
Llamas in Distress,Bow Master Halloween,Squary,
Try using this it would help you..
$gamelist = preg_replace('/\s+/', ' ',$row['favoritegamelist']));