Use the nl2br() function
--zak
- Original Message -
From: Mike Mike [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 8:11 AM
Subject: [PHP] PHP using Forms
Hello,
I have a form field TEXTAREA name=Home ROWS=10
COLS=40? echo $Home ?/TEXTAREA
with this data in
Try this:
$Home = nl2br($Home); // nl2br converts newlines to brs
See http://www.php.net/nl2br for more info.
(Incidentally, I answered exactly the same question yesterday, in exactly
the same way. *Please* check the list archives/last few days postings/manual
before posting this sort of
)
{
return(nl2br(htmlentities($string)));
}
-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 10:16 AM
To: 'Mike Mike'; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP using Forms
Try this:
$Home = nl2br($Home
PROTECTED]
Subject: RE: [PHP] PHP using Forms
Try this:
$Home = nl2br($Home); // nl2br converts newlines
to brs
See http://www.php.net/nl2br for more info.
(Incidentally, I answered exactly the same question
yesterday, in exactly
the same way. *Please* check the list archives/last
4 matches
Mail list logo