PHP Heredoc (EOD)

There are possibly three ways to declare or specify a string in your PHP code. We often use single quote(‘’) and double quote (“”) to specify a string. However, Heredoc is the another method to declare.

Syntax:

<<<EOD

Your string goes here

EOD;

Real-time Example of Heredoc:

VIDEO