> Trying to get text from a CGI textarea box to go into MySQL with the <br>
> line breaks instead on generic \n breaks. Is there an easy way to parse
the var
> and make the necessary change?
You can use a Perl regular expression. The following seems to work for me:
# replace line breaks with HTML <BR> tags
$textarea =~ s/\n/<BR>/g;
Kind regards,
Chris
Waverley Internet Design
http://www.waverley-internet.co.uk
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php