PHP - Extracting a property from an array of objects
<p>I've got an array of cats objects:</p>

<pre><code>$cats = Array
    (
        [0] =&gt; stdClass Object
            (
                [id] =&gt; 15
            ),
        [1] =&gt; stdClass Object
            (
                [id] =&gt; 18
            ),
        [2] =&gt; stdClass Object
            (
                [id] =&gt; 23
            )
)
</code></pre>

<p>and I want to extract an array of cats' IDs in 1 line (not a function nor a loop). </p>

<p>I was thinking about using <code>array_walk</code> with <code>create_function</code> but I don't know how to do it.</p>

<p>Any idea?</p>
