jwwceo Posted November 10, 2006 Share Posted November 10, 2006 I have a text area being outputted by php. The items in the textarea need to all be listed on their own line. so my text has "/n" in it.Im using the PRINT<<< EOFEOF;method of outputting. any ideas on how to get the text area to have breaks in it???Jame Link to comment https://forums.phpfreaks.com/topic/26771-n-in-php/ Share on other sites More sharing options...
Nicklas Posted November 10, 2006 Share Posted November 10, 2006 [url=http://www.php.net/nl2br]nl2br()[/url] Link to comment https://forums.phpfreaks.com/topic/26771-n-in-php/#findComment-122407 Share on other sites More sharing options...
btherl Posted November 10, 2006 Share Posted November 10, 2006 To elaborate on that rather brief answer, you can do[code]$var = <<<EOFblahblahblahEOF;print nl2br($var);[/code]All nl2br() does is converts each newline into a br tag Link to comment https://forums.phpfreaks.com/topic/26771-n-in-php/#findComment-122417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.