获得解析错误

时间:2016-03-03 14:05:17

标签: php

我得到的错误是:

  

解析错误:语法错误,意外' {'在   第272行xxx

第272行是:

TCURR

2 个答案:

答案 0 :(得分:2)

条件

的其他问题
<?php 
if(htmlentities($shop['categorie']) == '1') {
  echo "Achtergronden"; 
} elseif(htmlentities($shop['categorie']) == '2') {
  echo "Widgets"; }
// your version: else(htmlentities($shop['categorie']) == '3') {
// and correct one below
elseif(htmlentities($shop['categorie']) == '3') {
    echo "Overig"; 
} ?>

答案 1 :(得分:0)

您必须在最后一个条件

中使用else而不是<?php if(htmlentities($shop['categorie']) == '1') { echo "Achtergronden"; } elseif(htmlentities($shop['categorie']) == '2') { echo "Widgets"; } elseif(htmlentities($shop['categorie']) == '3') { echo "Overig"; } ?>
a
相关问题