title: php regex to get id from url
body: <p>I have an url like this</p>
  
  <pre><code>http://localhost/MyProjects/client-contacts/?client=2
  </code></pre>
  
  <p>In php regex I want to get the id from the url. In the above url the id is 2. So can someone tell me how to get id from the url? Any help and suggestions will be really appreciable. Thanks</p>