PHP Check for NULL

后端 未结 5 550
后悔当初
后悔当初 2020-11-30 11:04

Here is the below Code:

$query = mysql_query(\"SELECT * FROM tablex\");

if ($result = mysql_fetch_array($query)){

    if ($result[\'column\'] == NULL) { pr         


        
5条回答
  •  萌比男神i
    2020-11-30 11:21

    Use is_null or === operator.

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

提交回复
热议问题