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? 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>'; 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 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. Link to comment https://forums.phpfreaks.com/topic/128104-solved-echoprint-html-coding/#findComment-663495 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.