I'm getting $row['message'] from my mysql db and I need to remove all whitespaces like \n \t and so on.
$row['message'] = 'This is a Text \n and so on \t Text text.';
should be formated to:
$row['message'] = 'This is a Text and so on Text text.';
I tried
$ro = preg_replace('/\s\s+/', ' ',$row['message']);
echo $ro;
but it dosn't removes \n or \t, just single spaces. Can anyone tell me how to do that? Thanks!