Retrieve value from a multi-dimensional array in PHP
<p>I have a multidim array that I can view using <strong>print_r($users)</strong>:</p>

<pre><code>Array
(
    [0] =&gt; stdClass Object
        (
            [username] =&gt; crustacea
            [created_on] =&gt; 2010-08-07 19:54:32
            [active] =&gt; 1
        )
)
</code></pre>

<p>I can also use <strong>print_r($users[0])</strong>.  Since there's only one member in $users, the output looks somewhat the same.  </p>

<p>I can't see how to retrieve the value <em>crustacea</em>.  <strong>echo $users[0]['username'];</strong> doesn't do it.  Examples I can find are <strong>echo $users['name_of_array']['username'];</strong>  -- but I don't have a name of array to work with.  How do I do it?</p>
