Home > Backend Development > PHP Tutorial > php的if else有关问题?

php的if else有关问题?

WBOY
Release: 2016-06-13 13:19:20
Original
865 people have browsed it

php的if else问题???
我是一个新手,今天在修改一个PHP源码的时候因为要用到一个PHP的IF else的问题,还望各位大侠给以帮助。

link.php?id=abc 当没有abc时即id的值为空的时候提示参数不正确,当id的值不为空时执行link.php?id=abc

这个语句怎么写?

------解决方案--------------------
if(isset($_GET['id'])){
//有id

}else{
//没有id 提示代码
}
------解决方案--------------------

PHP code
if(isset($_GET['id'])){
    //有id   

}else{
    //没有id  提示代码
} <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
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