Home » PHP Code »

0

Following script will work for remove the newline and remove the consecutive white spaces

function remW( $content )
{
$content = trim(ereg_replace(“\n|\r|\r\n|\n\r”, ”, preg_replace(‘/\s+/’, ‘ ‘, $content)));
return $content;
}


Related Posts

    Date Format in the PHP Code?PHP Charts with using Google APIAuto post into Blogspot using php code?How to Build PHP application in Google App Engine

 

Leave a Reply