Hello! I've drawn a blank. I'm setting up a session variable to obtain the information typed in a textarea such as this. Then outputing the text in a printer friendly page. Yet when I do this any \n (new lines) are concatonated into one long paragraph.... ie. 1 2 3 would show up as 123
I was woundering if anyone had any suggestions, such as would it help to load this variable into a frame of some sort which would be compatable to a textarea..... Thanks anything will help
Use the function nl2br().
Example: say the name of your textarea is string_with_newlines
<?php $awesomely_cool_string=nl2br($string_with_newlines); print $awesomely_cool_string; ?>
This should work...I think...unless you meant something else...
Thanks, nl2br() worked like a charm..... out of curiosity where did you find out about this function??
anyways Thanks again...