how to read data in array?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4927843/how-to-extract-data-out-of-a-specific-php-array">How to extract data out of a specific PHP array</a>  </p>
</blockquote>



<p>I have an array that I am trying to fetch all elements from a specific key in. The key is <code>shard3</code>.
The result should be <code>'user'=&gt;'root','password'=&gt;'3', 'db'=&gt;'test', 'port'=&gt;3307</code>   </p>

<pre><code>    private   $shard_list = array ( 
      'shard1' =&gt; array( 'host'=&gt;'127.0.0.1',
     'user'=&gt;'root',
     'password'=&gt;'1',
     'db'=&gt;'test', 
     'port'=&gt;3306
    ),
    'shard2' =&gt; array( 'host'=&gt;'127.0.0.2',
        'user'=&gt;'root',
        'password'=&gt;'2',
         'db'=&gt;'test', 
         'port'=&gt;3307
     ),
     'shard3' =&gt; array( 'host'=&gt;'127.0.0.3',
     'user'=&gt;'root',
     'password'=&gt;'3',
     'db'=&gt;'test', 
     'port'=&gt;3307
     ),
    'shard4' =&gt; array( 'host'=&gt;'127.0.0.4',
        'user'=&gt;'root',
        'password'=&gt;'4',
         'db'=&gt;'test', 
        'port'=&gt;3307
     )
</code></pre>

<p>I want to read all elements in <code>shard3</code>. What is the way to read all elements?</p>
