title: preg_match_all print *all* matches
body: <p>I need to print all matches using preg_match_all.</p>
  
  <pre><code>$search = preg_match_all($pattern, $string, $matches);
  
  foreach ($matches as $match) {
      echo $match[0];
      echo $match[1];
      echo $match[...];
  }
  </code></pre>
  
  <p>The problem is I don't know how many matches there in my string, and even if I knew and if it was 1000 that would be pretty dumb to type all those <code>$match[]</code>'s.</p>