What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP textarea help

PHP textarea help
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: PHP textarea help
quote:
Originally posted by Leo
quote:
Originally posted by -dt-
do something like
code:
$message = $_POST['textarea'];
$message = str_replace("\n",'
',$message);


and it should turn all newlines into
's
Why not use PHP's nl2br() function? [Image: msn_tongue.gif]
:-/ because as it says "Inserts HTML line breaks before all newlines in a string" , keeping the new lines is just blah replacing them is alot better :P
[Image: dt2.0v2.png]      Happy Birthday, WDZ
11-19-2005 04:18 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP textarea help - by Ezra on 11-19-2005 at 03:43 PM
RE: PHP textarea help - by -dt- on 11-19-2005 at 03:57 PM
RE: PHP textarea help - by L. Coyote on 11-19-2005 at 04:04 PM
RE: PHP textarea help - by -dt- on 11-19-2005 at 04:18 PM
RE: PHP textarea help - by L. Coyote on 11-19-2005 at 05:48 PM
RE: PHP textarea help - by Ezra on 11-19-2005 at 08:36 PM
RE: PHP textarea help - by -dt- on 11-20-2005 at 01:16 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On