title: loop through array of objects
body: <p>I Have an array called $pages content is as follows:</p>
  
  <pre><code>Array
  (
  [01-about-us] =&gt; Page Object
      (
          [_uri] =&gt; about-us
          [_menuItem] =&gt; 01
          [_visable] =&gt; 1
      )
  
  [02-contact] =&gt; Page Object
      (
          [_uri] =&gt; contact
          [_menuItem] =&gt; 02
          [_visable] =&gt; 1
      )
  
  [_sitemap] =&gt; Page Object
      (
          [_uri] =&gt; sitemap
          [_menuItem] =&gt; 
          [_visable] =&gt; 
      )
  
  [home] =&gt; Page Object
      (
          [_uri] =&gt; home
          [_menuItem] =&gt; 
          [_visable] =&gt; 1
      )
  )
  </code></pre>
  
  <p>is there an easy way to loop through and get page objects by there properties ie:</p>
  
  <pre><code>&lt;?php foreach($pages-&gt;_visible() AS $p): ?&gt;
    &lt;li&gt; page &lt;/li&gt;
  &lt;?php endforeach ?&gt;
  </code></pre>