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...
0
brillcareer's Avatar, Join Date: May 2015
Newbie Member
hi Kylexy

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

echo $str;
?>
coderzone, shabbir likes this