我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何在If条件中添加两个表?

Can someone help me in this simple code? (Unfortunately, I don't have experience in programming)

I want to add two tables inside if condition.

Here my code:

if($n_name == '') {
    echo "<div class='alert alert-error'>All options are required!</div>";
}

I've done like this:

if($n_name, $n_city == '') {
    echo "<div class='alert alert-error'>All options are required!</div>";
}

but didn't work!

Try with &:

if($n_name & $n_city == '') {
    echo"<div class='alert alert-error'>All options are required!</div>";
}

近期文章

  • fatfreeframework PHP数据库加载和打印
  • 使用Ajax将表单数据发布到ZF2控制器
  • CodeIgniter Active Record'喜欢'忽略'在哪里'
  • Codeigniter 2.1 - 文件上传,字符替换
  • 如何使用PHPseclib捕获未处理的错误?
  • cakephp将ACL添加到功能登录系统
  • symfony2实体验证regexp a-z A-Z 0-9
  • Codeigniter活动记录返回单个数组
  • cisco ACL ip access-group 1 (in/out)不明白
  • C++OJ题目 文件名排序(结构体)
  • PHP用户帐户激活检查不起作用
  • PHP foreach没有引用错过元素
  • 检查字符串是否存在及其位置
  • PHPUnit - 使用$ _POST变量测试MVC控制器
  • php升级导致Magento出现任何问题[重复]
  • Paypal IPN已验证但未更新数据库
  • PHP时间与我的服务器不匹配
  • 来自动作值的php从下拉列表中获取
  • 如何从私有函数中获取PHP变量
  • 在PHP 5中,我可以动态地实例化一个类吗?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华