extremely basic question - php

kylexy's Avatar, Join Date: Feb 2012
Go4Expert Member
can somebody explain me heredoc and newdoc syntax in a few words please ?
i know it's so basic but since i have no idea ... it's hard 4 me.
it'd be extremely helpful to understand this...
brillcareer's Avatar, Join Date: May 2015
Newbie Member
hi Kylexy

here is the syntax for heredoc
$str = <<<DEMO
This is a
demo message
with heredoc.

echo $str;
coderzone, shabbir likes this
alia123's Avatar, Join Date: Jan 2016
Nowdocs are to single-quoted strings what heredocs are to double-quoted strings. A nowdoc is specified similarly to a heredoc, but no parsing is done inside a nowdoc.
Here’s a link I’m sharing check this for more details” http://lindensgarden.blogspot.in/200...redoc-and.html