Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
循环中的php t_字符串错误_Php_Loops_Input_Textbox - Fatal编程技术网

循环中的php t_字符串错误

循环中的php t_字符串错误,php,loops,input,textbox,Php,Loops,Input,Textbox,我认为这段代码还可以,但是我收到程序这一部分的错误“Parse error:syntax error,unexpected T_STRING”。谁能告诉我我做错了什么?如果我把风格部分写对了 谢谢 } elseif ($answers['answerType'] == "textbox"){ echo ("\n<ul><input type=\"text\" id=\"text-$questionID\" value=\"$answer\" style=

我认为这段代码还可以,但是我收到程序这一部分的错误“Parse error:syntax error,unexpected T_STRING”。谁能告诉我我做错了什么?如果我把风格部分写对了

谢谢

    } elseif ($answers['answerType'] == "textbox"){
    echo ("\n<ul><input type=\"text\" id=\"text-$questionID\" value=\"$answer\"
    style="width:100px; height:40px"; <br /></ul>";
}elseif($answers['answerType']==“textbox”){

echo(“\n
    您没有转义所有的
    字符,也没有关闭
    ),您可以对其进行操作。请尝试:

    echo "\n<ul><input type=\"text\" id=\"text-$questionID\" value=\"$answer\"
          style=\"width:100px; height:40px\"; <br /></ul>";
    

    echo”\n
      您需要添加斜杠,其中包含所有双引号和不需要的括号 试一试


      echo“\n
        您的回音行不正确。您打开了不需要的
        ,并且没有逃逸
        。因此最好使用不同的内部引号或使用
        herdoc
        。请尝试此方法

        echo "\n<ul><input type='text' id='text-$questionID' value='$answer' style='width:100px; height:40px'; <br /></ul>";
        

        echo”\n
          试试这个,您没有正确关闭输入标记,需要包装内联样式
          \

           <input type=\"text\" id=\"text-$questionID\" value=\"$answer\"
          style=\"width:100px; height:40px;\">
                                          ---^
          
          
          ---^
          
          考虑添加更多代码。看到条件块的一部分没有初始的
          if
          语句会让人不安。还包括您已经尝试过的任何资源。
           <input type=\"text\" id=\"text-$questionID\" value=\"$answer\"
          style=\"width:100px; height:40px;\">
                                          ---^