PHP Check for NULL

mysql, null, php

Solution

Use is_null or `===` operator.

is_null($result['column'])

$result['column'] === NULL

Problem

Here is the below Code: ``` $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 />"; } } ``` If the values are `NOT NULL` i still get the uncheked box. Am i doing something wrong from above, shoudnt `$result['column'] == NULL` work? Any Ideas?

Original source