title: Limit the number of results using preg_match_all PHP
body: <p>Is there any way to limit the number of matches that will be returned using <code>preg_match_all</code>?</p>
  
  <p>So for example, I want to match only the first 20 <code>&lt;p&gt;</code> tags on a web page but there are 100 <code>&lt;p&gt;</code> tags.</p>
  
  <p>Cheers</p>