PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
If you have loops that display data on a web page, and you don't use the \n to create line feeds, then you view the source code, everything in the loop might be on one line.
Haha, although that is a good reason, I usually keep things in \n form due to the fact that the data might not always be displayed on a webpage.
They might want to download it in CSV format. They might want to edit it (meaning you need to convert the <br />'s back to \n's). Etc etc.
Haha, although that is a good reason, I usually keep things in \n form due to the fact that the data might not always be displayed on a webpage.
They might want to download it in CSV format. They might want to edit it (meaning you need to convert the <br />'s back to \n's). Etc etc.
lol, I know me too. just felt like we needed some Sunday Humor
So the use of \n is a matter of the HTML source code appearance. Aha, I see the difference now.
But I did not understand the difference between <br> and < /br> ... For example if I convert all my \n to <br /> is there any problem with HTML W3C Validator or somethin ?
Usually \n is required in most case in sending email, saving file in csv etc. <BR> is to generate the line feed in browser only and not for other purpose .