Hi guys, I have some text in a variable, something like: $bbtext = $_REQUEST['bbcodetext']; ( pulled from a textarea form) The text in this is: "This is line 1, This is line 2, This is line 3, and so on..." The problem is that when I print this to a blank file on my server, the lines are joined, something like: "This is line 1,This is line 2,This is line 3,and so on..." Is it possible to add a "<br>" at the end of each line and then store it in the same variable before sending it to the file? If so, then please help. Thank you jeet
text editors don't understand the <br> tag. you will need to insert a \n (newline character) anywhere you want to have a line break... so you should write the following to file: "This is line 1,\nThis is line 2,\nThis is line 3,\nand so on..."
I was under the impression that the textarea sent the newline (\n) characters with its text. That would mean that you don't need to insert any newline characters: server side, you just need to replace any instance of '\n' with '<br>'.
Very cool!!! Totally works... It's just when I added an " ' ", a back slash is displayed before that. But I can be careful about that. Thanks so much. Bye jeet