在PHP中定义变量

时间:2013-11-09 04:27:56

标签: php html

所以我一直试图理解我提到的一些PHP / HTML代码,但它根本不起作用,我缺少什么?

<?php 
$page = 'Start';

include 'themes/battlefield4/header.php';
?>

<h1><?php $page ?></h1>

<?php
include 'themes/battlefield4/footer.php';
?>

1 个答案:

答案 0 :(得分:2)

您必须echoprint任何输出

<h1><?php echo $page ?></h1>