bobohob Posted December 12, 2007 Share Posted December 12, 2007 I found it's a hassle to code html inside php, for example when you compose a message for email : $message = "<b>................... ............. ......... ........</b>"; is there a better/convenient method ? Thank you in advance. Link to comment https://forums.phpfreaks.com/topic/81300-solved-html-content-inside-php/ Share on other sites More sharing options...
rajivgonsalves Posted December 12, 2007 Share Posted December 12, 2007 you can use the heredoc string $message = <<< MARK .... ..... ..... MARK; more information at http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc Link to comment https://forums.phpfreaks.com/topic/81300-solved-html-content-inside-php/#findComment-412622 Share on other sites More sharing options...
dsaba Posted December 12, 2007 Share Posted December 12, 2007 only hard thing about mixing html with PHP is escaping quotes $var = "<html attrib=\"lala\" />"; concatenation is easy "string".php."string" Link to comment https://forums.phpfreaks.com/topic/81300-solved-html-content-inside-php/#findComment-412642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.