Home  >  Article  >  Backend Development  >  PHP语法异常,折腾一天了,求高手帮忙

PHP语法异常,折腾一天了,求高手帮忙

WBOY
WBOYOriginal
2016-06-13 12:13:42853browse

PHP语法错误,折腾一天了,求高手帮忙。
我写一个无限级分类下拉功能,到下面这个代码老是报错,折腾一天了,求高手看看。

<br />           $str_select.= "<option value=" .$row['classid'] if ($classid == $row['classid']){ echo "selected"}.">" .str_repeat( "-" ,$depth) . $row['classname']."</option>"; //字符串构建<br />


错误提示:Parse error: syntax error, unexpected T_IF
------解决思路----------------------
$str_select .= ""; //字符串构建

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn