title: Comparison of variable in php
body: <p>I have 3 variables named <code>$a</code>, <code>$b</code>, and <code>$c</code>. These variables hold dynamic value which comes from database.</p>
  
  <p>I want compare these variable if <code>$a</code>, <code>$b</code>, <code>$c</code> hold space means " " then print <code>no message</code> and if variable <code>$a</code>, <code>$b</code> hold space and <code>$c</code> hold message print message,if <code>$a</code>, <code>$c</code> hold space and <code>$b</code> hold message print message, if <code>$b</code>, <code>$c</code> hold space and <code>$a</code> hold message print message. Please help me. Thanks</p>
  
  <p>My code is</p>
  
  <pre><code>if(($_GET['ms1']== " " ) &amp;&amp; ($_GET['ms2'] == " ") &amp;&amp; ($_GET['ms3']==  " "))
  
      {
        print"&lt;p style=color:red;text-align:center;font-family:Times New Roman,Georgia,Serif;&gt;";
        echo "No Message From Court.";
        print"&lt;/p&gt;";
        print"&lt;p style=color:green;text-align:center;font-family:Times New Roman,Georgia,Serif;&gt;";
        echo "Thank You";
        print"&lt;/p&gt;";
  
      }
  
   elseif(($_GET['ms1']==' ') &amp;&amp; ($_GET['ms2']==' '))
  
  
        {
              print"&lt;p style=color:red;font-family:Times New Roman,Georgia,Serif;text-align:center;&gt;";
               echo '3'.$_GET['ms3'];
              print"&lt;/p&gt;";
  
  
        }
  
   elseif(($_GET['ms1']== ' ') &amp;&amp; ($_GET['ms3']==' '))
  
  
        {
              print"&lt;p style=color:red;font-family:Times New Roman,Georgia,Serif;text-align:center;&gt;";
              echo '2'.$_GET['ms2'];
              print"&lt;/p&gt;";
  
  
        }
  
      elseif(($_GET['ms2']==' ') &amp;&amp; ($_GET['ms3']==' '))
  
  
        {
              print"&lt;p style=color:red;font-family:Times New Roman,Georgia,Serif;text-align:center;&gt;";
              echo '1'.$_GET['ms1'];
              print"&lt;/p&gt;";
  
  
        }
  </code></pre>