From http://stackoverflow.com/questions/3760816/remove-new-lines-from-string
$string = preg_replace('~[\r\n\t]+~', '', $string);