title: Not able to view NULL values from MYsql in PHP
body: <p>I have a table which contains some Role_codes
  Find below table</p>
  
  <p><a href="https://i.stack.imgur.com/INY5K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/INY5K.png" alt="enter image description here"></a></p>
  
  <p>I'm able to get all distinct role_code from the table but in the case NULL the result is blank.</p>
  
  <p>Below code for the same:</p>
  
  <pre><code>    &lt;?php
  
      if ($role_code === 'BOB')
          {
          $sql = "SELECT distinct role_code FROM `create_user`";
          $result = $pdoConn-&gt;query($sql);
          if ($result !== false)
              {
              echo "&lt;div class='w3-container w3-responsive w3-round w3-padding-
              large' style='width:95%;margin:10px;'&gt;";
          echo " &lt;h4 class='w3-text-indigo'&gt;Admin please select role to view 
             record.&lt;/h4&gt; 
  &lt;select id='view_record' name='view_record' class='w3-input w3-light-grey' style='width:90%'&gt;&lt;option value='select Role'&gt;Select Role&lt;/option&gt;";
              while ($row = $result-&gt;fetch(PDO::FETCH_ASSOC))
                  {
                  $role_id = $row["role_code"];
                  echo "&lt;option  value=$role_id&gt;" . $row["role_code"] . "&lt;/option&gt;";
                  }
  
              echo "&lt;/select&gt;&lt;/div&gt;";
              }
          }
  </code></pre>
  
  <p>the above code is returning all the unique values but in the case Null it is returning blank.</p>