Page 1 of 1
how to use \n,\t in php?
Posted: Sun Oct 10, 2010 10:57 am
by tuanict_vn
hi all! i'm a beginner in Php, and i have a problem with: \n,\t. I want to use it for newline and tab, but it is show in browser of me when i write:
print "Wellcome to VietNam!\n.Hello!";
Please help me! Thanks.
Re: how to use \n,\t in php?
Posted: Sun Oct 10, 2010 11:17 am
by s.dot
Your browser is rendering the page as HTML. Your new line is there. View the source of the page to see it.
Re: how to use \n,\t in php?
Posted: Sun Oct 10, 2010 11:18 am
by jabbaonthedais
Yeah the new line is working, but it only affects the page source, not how it appears in the browser. To make a new line in the browser you need to use html like <br>