title: String comparison is not working in php
body: <p>I'm very new to php. I have a json named <code>json</code>. When I try to do this:</p>
  
  <pre><code>echo $json-&gt;status;
  </code></pre>
  
  <p>I get :</p>
  
  <pre><code>CREATED
  </code></pre>
  
  <p>I try to compare this result with normal string <code>CREATED</code> like this:</p>
  
  <pre><code>if(strcasecmp("CREATED",$json-&gt;status))
  {
      print_r("Order created successfuly");
  }
  </code></pre>
  
  <p>but for some reason the <code>if condition</code> is not evaluting to <code>true</code>. Even though I compare <code>CREATED</code> with <code>CREATED</code>!</p>
  
  <p>Not sure where the error is.</p>
  
  <p>Thanks in advance.</p>