title: Simpler Way To List Array PHP?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5611483/printing-a-multi-dimensional-array-using-foreach-loop-only">Printing a multi dimensional array using Foreach loop only</a><br>
    <a href="https://stackoverflow.com/questions/12873951/merge-multiple-associative-arrays-to-a-single-array-of-associative-arrays">Merge multiple associative arrays to a single array of associative arrays</a>  </p>
  </blockquote>
  
  
  
  <p>I have a script that loops scraping links from different pages and places them into an array with different keys. Now I want the script to echo all the final links into a list. As of now the only way I know to do this is like this:</p>
  
  <pre><code>foreach($matches[0][1] as $match) {
     echo "$match&lt;br /&gt;";
  }
  
  foreach($matches[1][1] as $match) {
    echo "$match&lt;br /&gt;";
  }
  
  foreach($matches[2][1] as $match) {
    echo "$match&lt;br /&gt;";
  }
  </code></pre>
  
  <p>How can I have it do something where I don't have to do a foreach loop for each array key. Something like</p>
  
  <pre><code>foreach($matches[ALL][1] as $match) {
  }
  </code></pre>