Php file\u put\u content()方法错误

Php file\u put\u content()方法错误,php,mysql,Php,Mysql,我正在将一些内容放入名为'index.php'的文件中,代码如下: $put=<<<DEMO <div id='container' style='width:100%'> <style> h1 {font-size:45px;} </style> <div id='header' style='background-color:#FFFFFF;'> <h1 style='margin-bottom:0;margin-top

我正在将一些内容放入名为'index.php'的文件中,代码如下:

$put=<<<DEMO
<div id='container' style='width:100%'>
<style>
h1 {font-size:45px;}
</style>
<div id='header' style='background-color:#FFFFFF;'>
<h1 style='margin-bottom:0;margin-top:0;height:20%;float:center;'>
while($row = mysql_fetch_array($result))
{

问题在于变量插值语法。要么是

"$var[foo]"

不是


阅读:。

第108行是什么,html表格字符串?您在编写代码的文件中的代码或已编写的代码中遇到此错误?@axel.michel我使用第108行通知第108行的开头。我用它是因为它是错误所在的那一行is@user2078502是的,我知道,但是在你粘贴的代码中有几行,从以下开始:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in E:\Program Files\xampp\htdocs\registration.php on line 108
"$var[foo]"
"{$var['foo']}"
"$var['foo']"