$string = str_replace("\n", '<br>', $string);

David T-G wrote:
Hi, all --

As has been discussed before, the nl2br function doesn't actually convert
newlines to breaks but instead is more like "nl2nlbr".  That is,

  input
  like
  this

becomes

  input
  <br>like
  <br>this

instead of

input<br>like<br>this


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to