Blogroll

Friday, June 15, 2012

Remove new line php

I'll many way to remove new line in php. Some version not working in some code. Below is code almost working well
$string = preg_replace('@[\s]{2,}@',' ',$value);
$string  = trim(str_replace(array("/\n|\r/","\""),array("", "'"), $string));