我读谷歌Analytics(分析)API文档,发现我从来没有见过一个语法/前使用:HTML标记:<<< HTML
<script>
<?php
<<<HTML
cxApi.setChosenVariation(
$chosenVariation, // The index of the variation shown to the visitor
$experimentId // The id of the experiment the user has been exposed to
);
HTML;
?>
</script>
是什么<<<HTML
做的,这是什么叫什么?
称为[Heredoc](http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc)。 – Rikesh 2013-05-12 15:37:38
[参考 - 这个符号在PHP中的含义是什么?](http://stackoverflow.com/q/3737139) – mario 2013-05-12 15:44:25
@mario谢谢!棒极了! – 2013-05-12 15:45:26