I tried
str_replace(array("\r\n", "\r", "\n", "\t"), ' ', $text);
It could strip new lines but there are still some tabs as you can see below. what’s the preblem?
Metal Machine Music, Part I<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> Metal Machine Music, Part II<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> Metal Machine Music, Part III<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br />
Use
preg_replaceSee http://codepad.org/2Dz1NmzD