How can i remove a new line character from a string using php.
$string = str_replace("\n", "", $string); $string = str_replace("\r", "", $string);
$string = str_replace(PHP_EOL, '', $string);
or
$string = str_replace(array("\n","\r\n"), '', $string);