HTML文档中回显的简短方法?

时间:2014-07-27 10:58:22

标签: php html echo

是否有更短的方法来回显html脚本中的变量

例如:index.php

...
<head><title><?php echo $MyTitle; ?></title></head>
...

1 个答案:

答案 0 :(得分:2)

是的,有

<?= $MyTitle ?>

但它可以在php.ini中定义为short-open-tag的某些php配置中禁用 http://php.net/manual/en/ini.core.php#ini.short-open-tag