<i id='kuRmJ'><tr id='kuRmJ'><dt id='kuRmJ'><q id='kuRmJ'><span id='kuRmJ'><b id='kuRmJ'><form id='kuRmJ'><ins id='kuRmJ'></ins><ul id='kuRmJ'></ul><sub id='kuRmJ'></sub></form><legend id='kuRmJ'></legend><bdo id='kuRmJ'><pre id='kuRmJ'><center id='kuRmJ'></center></pre></bdo></b><th id='kuRmJ'></th></span></q></dt></tr></i><div id='kuRmJ'><tfoot id='kuRmJ'></tfoot><dl id='kuRmJ'><fieldset id='kuRmJ'></fieldset></dl></div>
<legend id='kuRmJ'><style id='kuRmJ'><dir id='kuRmJ'><q id='kuRmJ'></q></dir></style></legend>

<small id='kuRmJ'></small><noframes id='kuRmJ'>

          <bdo id='kuRmJ'></bdo><ul id='kuRmJ'></ul>

        <tfoot id='kuRmJ'></tfoot>
      1. PHP 检查 NULL

        时间:2023-10-15
        <i id='k8yC2'><tr id='k8yC2'><dt id='k8yC2'><q id='k8yC2'><span id='k8yC2'><b id='k8yC2'><form id='k8yC2'><ins id='k8yC2'></ins><ul id='k8yC2'></ul><sub id='k8yC2'></sub></form><legend id='k8yC2'></legend><bdo id='k8yC2'><pre id='k8yC2'><center id='k8yC2'></center></pre></bdo></b><th id='k8yC2'></th></span></q></dt></tr></i><div id='k8yC2'><tfoot id='k8yC2'></tfoot><dl id='k8yC2'><fieldset id='k8yC2'></fieldset></dl></div>
          <tbody id='k8yC2'></tbody>
        • <bdo id='k8yC2'></bdo><ul id='k8yC2'></ul>

            • <legend id='k8yC2'><style id='k8yC2'><dir id='k8yC2'><q id='k8yC2'></q></dir></style></legend>

              <tfoot id='k8yC2'></tfoot>

                <small id='k8yC2'></small><noframes id='k8yC2'>

                  本文介绍了PHP 检查 NULL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  代码如下:

                  $query = mysql_query("SELECT * FROM tablex");
                  
                  if ($result = mysql_fetch_array($query)){
                  
                      if ($result['column'] == NULL) { print "<input type='checkbox' />"; }
                      else { print "<input type='checkbox' checked />"; }
                  }
                  

                  如果值是 NOT NULL 我仍然得到未选中的框.我从上面做错了什么,应该 $result['column'] == NULL 工作吗?

                  If the values are NOT NULL i still get the uncheked box. Am i doing something wrong from above, shoudnt $result['column'] == NULL work?

                  有什么想法吗?

                  推荐答案

                  使用 is_null 或 === 运算符.

                  Use is_null or === operator.

                  is_null($result['column'])
                  
                  $result['column'] === NULL
                  

                  这篇关于PHP 检查 NULL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:检查值是否设置为空 下一篇:null 和 empty 和有什么不一样?

                  相关文章

                1. <legend id='k7NJN'><style id='k7NJN'><dir id='k7NJN'><q id='k7NJN'></q></dir></style></legend>

                  <tfoot id='k7NJN'></tfoot>

                  <small id='k7NJN'></small><noframes id='k7NJN'>

                    • <bdo id='k7NJN'></bdo><ul id='k7NJN'></ul>
                    <i id='k7NJN'><tr id='k7NJN'><dt id='k7NJN'><q id='k7NJN'><span id='k7NJN'><b id='k7NJN'><form id='k7NJN'><ins id='k7NJN'></ins><ul id='k7NJN'></ul><sub id='k7NJN'></sub></form><legend id='k7NJN'></legend><bdo id='k7NJN'><pre id='k7NJN'><center id='k7NJN'></center></pre></bdo></b><th id='k7NJN'></th></span></q></dt></tr></i><div id='k7NJN'><tfoot id='k7NJN'></tfoot><dl id='k7NJN'><fieldset id='k7NJN'></fieldset></dl></div>