为什么我的if判断执行过后还会执行else中的if,是我的代码问题么

WBOY
Release: 2016-06-23 13:11:26
Original
3058 people have browsed it


回复讨论(解决方案)

prin_r() 一下$id  $aid  看看是不是不一样啊晕

无论 $id、$aid 是否相等,删除都会进行

应该怎么写才能先判断是否相同,如果相同就不执行后面的内容,不相同在继续执行

把删除语句写在第一个 if 语句的 else 分支的开始处
因为你用的截图,所以不贴代码了,以免抄错

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!