开发者

My post content displays rn in bteween lines?

开发者 https://www.devze.com 2023-03-28 15:10 出处:网络
Whenever there is a space in between the post it soows rn. This is how I read the insert data: $content_of_post_original = mysql_real_escape_st开发者_开发技巧ring($_POST[\'post_content\']);

Whenever there is a space in between the post it soows rn. This is how I read the insert data:

$content_of_post_original = mysql_real_escape_st开发者_开发技巧ring($_POST['post_content']);
$content_of_post = stripslashes($content_of_post_original);

And then printed:

echo $show['post_content']


\r\n means a new line. Your strip slashes is removing this and just echoing rn instead of a new line.

Check out: http://php.net/manual/en/function.nl2br.php

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号