title: How to search/index an array of stdClass Object
body: <p>I have read some posts on here but I can't quite find what I am looking for. I have an array of <code>stdClass</code> Objects. Each element contains data for a field for a form. So you can imagine something like</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( [id] =&gt; 1 [title] =&gt; title ...
  </code></pre>
  
  <p>So now I am trying to create a form with fields in a certain order and am editing some code where the array variable already exists. Call it <code>$fields</code>. I need to index into this array so for the field I am interested in, I can retrieve all the data. This amounts to being able to, for instance, achieve the following: get me the row of <code>$fields</code> as <code>$row</code> where the field title is <code>title</code> so that I can then access the data as <code>$row-&gt;$id</code>, etc.</p>
  
  <p>I know this must be elementary, but my array skills are quite limited! Thanks!</p>
  
  <p>edit: Ahhh, I just found this: <a href="https://stackoverflow.com/questions/4742903/php-find-entry-by-object-property-from-a-array-of-objects">PHP - find entry by object property from a array of objects</a> That seems to be what I need.</p>