Skip to content

개행문자 CRLF( \n\r 엔터) 제거

MintState January 18, 2018 at 6:24 PM Views 10190

개행문자 CRLF( \n\r 엔터) 제거

정규식을 이용한 CRLF 제거

$text = preg_replace('/\r\n|\r|\n/','',$text);

문자열 처리 함수를 이용한 CRLF 제거

$text = str_replace(array("\r\n","\r","\n"),'',$text);

또는

$text = strtr($text,array("\r\n"=>'',"\r"=>'',"\n"=>'')); 
Share X Facebook LINE QR code

0 comments

Be the first to comment.