heredoc не отступает или работает как надо - PullRequest
0 голосов
/ 06 марта 2012

новичок в PHP.Просто возникают некоторые неприятные проблемы с heredoc, несмотря на то, что я следую книге за буквой синтаксиса.Текст ниже не имеет отступов, как должно быть.

<?php

$text="Mike's";

echo <<<_END

<!--END is just like double quoteing a var..
You can use single/double quotes without having to escape them first; inside 
END. The last _END tag, has to be on the start of new line with nothing allowed
to procede it, not even whitespace-->

This is the $text 'first line'.

This is the $text 'second line'.

This is the $text 'third line'.
_END;
?>

1 Ответ

2 голосов
/ 06 марта 2012

на основании наличия

...