Jump to content

[SOLVED] annoying extra line break


shadiadiph

Recommended Posts

hi i have been trying to $_GET a message string which has to be formatted nl2br inorder for it to keep its format but when i display it for the second time it keeps displaying as if it has an extra line break between each line break can any one think of a fix for this thanks.

 

$message = $_GET["mesid"];
$message = rawurldecode($message);
$message = stripslashes($message);
$message = preg_replace('/<br( )?(\/)?>/i', "\n", $message); 

Link to comment
https://forums.phpfreaks.com/topic/165859-solved-annoying-extra-line-break/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.