Home >Backend Development >PHP Tutorial >这么写if else语句也能有错?

这么写if else语句也能有错?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:52:04964browse

这样写if else语句也能有错?????
我本来打算将这一段代码嵌入到php脚本当中,但是老是提示一个错误:
Parse error: syntax error, unexpected T_ELSE in C:\AppServ\www\demo\templates_c\1d7c7a527b6335cc7a623305ca940e1findex.tpl.php on line 14

<br /><?php if ($status) {?><br /><div>This is the first block.<br /></div><br /><?php } ?><br /><?php else {?><br /><div>This is the third block.<br /></div><br /><?php } ?><br />


下图实在zend studio里面的错误提示


希望高手能帮帮忙,就小弟于水火之中啊!!!谢谢啦!!!!!
------解决方案--------------------
光是你给的这段没啥问题 是不是你外面还有大括号啊
------解决方案--------------------
 感觉没什么问题,你这个$status是怎么获取的
------解决方案--------------------
这样写应该就不提示错误了

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