Home > Backend Development > PHP Tutorial > empty如何样判断多个变量

empty如何样判断多个变量

WBOY
Release: 2016-06-13 12:44:08
Original
1455 people have browsed it

empty怎么样判断多个变量
如果一个IF语句用empty来判断多个变量怎么办,我试过好像不可以

<br />
$top='33';<br />
$metop='';<br />
<br />
if(empty($top)&&empty($metop)){  //这个地方可以用&& 来判断么,就是$top和$metop为空就提示,并且退出<br />
  echo '为空';<br />
  exit;<br />
}<br />
<br />
echo 'thank you!';   //如果上面为空,这里的地方也就不会显示出来了.<br />
<br />
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