phpcharan Posted August 25, 2008 Share Posted August 25, 2008 I am newbie in PHP I want to know about heredoc Whats the use of it...? It seems we need to use some identifier to use heredoc...what is an identifier? Link to comment https://forums.phpfreaks.com/topic/121205-whats-the-use-of-heredoc/ Share on other sites More sharing options...
GingerRobot Posted August 25, 2008 Share Posted August 25, 2008 The manual probably explains it best: http://uk3.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc Basically, the heredoc syntax allows you to delimit a string with a word, rather than with quotes. This means that you don't have to worry about escaping the single or double quote. It's particularly useful when echoing a large chunk of html. The identifier is that word used to delimit the string. Link to comment https://forums.phpfreaks.com/topic/121205-whats-the-use-of-heredoc/#findComment-624797 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.