title: How to search in array of std object (array of object) using in_array php function?
body: <p>I have following std Object array</p>
  
  <pre><code>Array
  (
      [0] =&gt; stdClass Object
          (
              [id] =&gt; 545
          )
  
      [1] =&gt; stdClass Object
          (
              [id] =&gt; 548
          )
  
      [2] =&gt; stdClass Object
          (
              [id] =&gt; 550
          )
  
      [3] =&gt; stdClass Object
          (
              [id] =&gt; 552
          )
  
      [4] =&gt; stdClass Object
          (
              [id] =&gt; 554
          )
  
  )
  </code></pre>
  
  <p>I want to search for value of <code>[id]</code> key using loop. I have following condition to check whether value is exist or not like below</p>
  
  <pre><code>$flag = 1;
  if(!in_array($value-&gt;id, ???)) {
      $flag = 0;
  }
  </code></pre>
  
  <p>Where <code>???</code> I want to search in array of std Object's <code>[id]</code> key.</p>
  
  <p>Can any one help me for this?</p>