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