Re: [PHP] Re: Replacing newlines (\n) with smething else

2003-07-15 Thread Joel Rees
But what if say I want to replace a newline with something else, say /pp. How would I do that? (with apologies for the lack of imagination :-P) ?php $George = Hello\n\tall\nyou\nfriendly people; echo 'George: ' . $George . \n; $Henry =

[PHP] Re: Replacing newlines (\n) with smething else

2003-07-13 Thread J. Cox
Jason Giangrande [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I'm trying to replace newlines with something else. For this example I'll use br as the thing to replace a newline with. This is what I tried and it doesn't work. $article = str_replace(\n, br, $article);

Re: [PHP] Re: Replacing newlines (\n) with smething else

2003-07-13 Thread Jason Giangrande
I did not know about nl2br. Thanks. But what if say I want to replace a newline with something else, say /pp. How would I do that? Jason On Sun, 2003-07-13 at 17:09, J. Cox wrote: Jason Giangrande [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I'm trying to replace