Home >Backend Development >PHP Tutorial >About the method of php processing textarea carriage return and line feed replacement (js call error)_PHP tutorial

About the method of php processing textarea carriage return and line feed replacement (js call error)_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:54:321045browse

About the php tutorial on the textarea carriage return and line feed replacement method (js call error)
In the textarea input box, chr(13) represents carriage return, but when I replace it, it can indeed get the character I want, but when it is displayed, there will be a space where the carriage return is,
After repeated debugging, there is an n. This should be the carriage return character in the database tutorial or program.
-->










if( $_post )
{
$textarea = str_replace("n",'',str_replace(chr(13),'',$_post['textarea']));
echo $textarea;
}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632314.htmlTechArticleAbout php tutorial on processing textarea carriage return and line feed replacement method (js call error) chr(13) in the textarea input box It represents carriage return, but when I replace it, it does get the character I want, but he...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn