function removeEmptyLines($string)
{
return preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $string);
}
Thursday, March 09, 2006
Remove blank / empty lines PHP [29]
I found this great implementation to remove blank (empty lines) from a string at PHP web site.
Subscribe to:
Posts (Atom)