php - php代码中的html标签: <<<HTML

标签 php html

<分区>

我在阅读 Google Analytics API 文档时注意到一种我以前从未见过/使用过的语法:

<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做,这个叫什么?

最佳答案

关于php - php代码中的html标签: <<<HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16508993/

相关文章:

php - 如何让 phpmailer 发送给正确的用户并限制某些用户的电子邮件数量?第2部分

php - 表单值的 SQL 更新不起作用

php - 使用 PHP 的 HTML DOMDocument 解析 HTML

javascript - Javascript 中的背景音乐不起作用

html - 如何相对于居中的 div 定位元素?

javascript - 在 JS 或 PHP 中构建 div

php - 使用 PHP 下载重命名的文件

php - 通过关系表间接连接 2 个表

javascript - 事件对象不是只用 Firefox 定义的(IE 和 Chrome 工作)

php - 将表单字段设置为有条件只读 (PHP)