Your Ad Here

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;
}


You may like these posts

    SEO - URL using php code and .htaccessGeneration of SEO URL in php codeHow to get complete information about server using php codeHow to clean a string using php code

 

Leave a Reply