PHP如果存在多个变量 [英] PHP if multiple variables exist
本文介绍了PHP如果存在多个变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以如果有多个变量存在,让我的PHP运行一个命令,我会遇到一些问题。我做了一个简单的版本,让人们看到我想要解决的问题。 )($ set $($ finalusername)
pre $ $ $ $ $ $ $ $ )&& if(isset($ finalpassword))&& if(isset($ finalemail)))
echoThis will save。;
?>
解决方案
if isset($ finalusername,$ finalpassword,$ finalemail))
另请参阅 isset 和空
。
So i'm having a bit of a problem with having my PHP run a command if multiple variables exist. I made a simple version for people to see what i'm trying to fix easier. Thanks in advance to anyone who can help :)
<?php
if ((isset($finalusername)) && if (isset($finalpassword)) && if (isset($finalemail)))
echo "This will save.";
?>
解决方案
if (isset($finalusername, $finalpassword, $finalemail))
Also see The Definitive Guide to PHP's isset
and empty
.
这篇关于PHP如果存在多个变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文