title: preg_match get the id from url
body: <p>Not quite understanding this. I am looking to get the id from url. path looks something like <code>site.com/shop/product/view?id=1&amp;name=name</code>. Im also confused what <code>matches</code> mean. I read the documentation and some sites, I still don't get it. So like for mine $matches[0] does that mean the first character after the match. Saw some examples and it didn't look like it.</p>
  
  <pre><code>public function parseUrl($manager,$request,$pathInfo,$rawPathInfo){
      if (preg_match('/id=[0-9]*/', $pathInfo, $matches))
              $id = $matches[0];
  </code></pre>
  
  <p>tried <code>if (preg_match('/^shop/product/view?id=(\d+)', $pathInfo, $matches))</code></p>