title: php : How to check a field have blank/empty/NULL value?
body: <p>I want to display an error when a variable have a BLANK value or EMPTY or NULL value. for example variable is shown below:</p>
  
  <pre><code> $mo = strtotime($_POST['MondayOpen']);
  </code></pre>
  
  <p>and<br>
      <code>var_dump($_POST['MondayOpen'])</code> returns <code>string(0) "".</code></p>
  
  <p>Now I go with below approach</p>
  
  <ol>
  <li><p>First want to find which type of variable <code>$mo</code> is ?(string or
  integer or other)  </p></li>
  <li><p>Which function is better to find that <code>$mo</code> having no value.</p></li>
  </ol>
  
  <p>I conduct a test with <code>$mo</code> and got these results</p>
  
  <pre><code>is_int($mo);//--Return nothing
  is_string($mo); //--Return bool(false) 
  var_dump($mo);  //--Return bool(true)                   
  var_dump(empty($mo));//--Return bool(true) 
  var_dump($mo==NULL);//--Return bool(true) 
  var_dump($mo=='');//--Return nothing
  </code></pre>
  
  <p>Please suggest an optimum and right approach to check the variable integrity</p>