acctman Posted October 12, 2008 Share Posted October 12, 2008 Hi is there an easier way to output HTML coding without have to put slashes for every quote? Quote Link to comment https://forums.phpfreaks.com/topic/128104-solved-echoprint-html-coding/ Share on other sites More sharing options...
fanfavorite Posted October 12, 2008 Share Posted October 12, 2008 what I like to do is use ' as most things in html use ". echo '<p class="someclass">Some Text</p>'; now things like \n\t don't work unless it is "\n\t", but you can always do: echo '<p class="someclass">Some Text</p>'; echo "\n\t"; echo '<div style="width: 200px">Some Box</div>'; Quote Link to comment https://forums.phpfreaks.com/topic/128104-solved-echoprint-html-coding/#findComment-663417 Share on other sites More sharing options...
AndyB Posted October 12, 2008 Share Posted October 12, 2008 heredoc - http://www.hudzilla.org/phpwiki/index.php?title=Heredoc_syntax Quote Link to comment https://forums.phpfreaks.com/topic/128104-solved-echoprint-html-coding/#findComment-663421 Share on other sites More sharing options...
DarkWater Posted October 12, 2008 Share Posted October 12, 2008 sprintf() also comes in handy for single quoted strings and variables. Quote Link to comment https://forums.phpfreaks.com/topic/128104-solved-echoprint-html-coding/#findComment-663495 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.