Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading from guestbook form 1

Status
Not open for further replies.

friskhelge

Technical User
Jun 10, 2004
1
NO
Hey

This question has probably some extremely simple answer, but I havent managed to find it yet, so here it goes.

I have a guestbook for my webpage, but I can't convert lineshifts fom the form into html-tags (<br>).
Anybody got any help for me here?

 
hi,

is this would you are looking for:

$test="\nhello\n";
$test=~s/\n/<br>/g;

will convert to:

<br>hello<br>

hope this helps,
parkers
 
sorry ... i should have also mentioned that the following is also true:

$test="

hello

";

applying,

$test=~s/\n/<br>/g;

will result in:

<br><br>hello<br><br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top