Fira Posted September 25, 2006 Share Posted September 25, 2006 Simple question - how can I end a block of text with a linebreak? Quote Link to comment Share on other sites More sharing options...
trq Posted September 25, 2006 Share Posted September 25, 2006 [code=php:0]echo "this is a block of text\n";[/code] Quote Link to comment Share on other sites More sharing options...
Fira Posted September 25, 2006 Author Share Posted September 25, 2006 [quote]<?phpecho "text1\n";echo "text2\n";?>[/quote]This code results in [quote]text1 text2[/quote]Is it supposed to? Quote Link to comment Share on other sites More sharing options...
trq Posted September 25, 2006 Share Posted September 25, 2006 If you view it in a browser it will. View the source however and you will see the linebeaks. If its html linebreaks you want, well.... that has nothing to do with php really.[code=php:0]<?phpecho "text1<br />";echo "text2<br />";?>[/code] Quote Link to comment Share on other sites More sharing options...
Fira Posted September 25, 2006 Author Share Posted September 25, 2006 Yes, that's what I needed. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.