title: How to check for a question mark in PHP string using regex?
body: <p>I have a string returning a URL and need to figure out how to use <code>if</code> and regex to do something whenever the returned URL contains a question mark.</p>
  
  <p>So when $url is <code>http://somedomain.com/?p=34325&amp;blahblahblah</code></p>
  
  <p>IF the $url contains "<code>?p=</code>" (and discarding everything else) then exit, otherwise do something</p>
  
  <p><br>
  Any help?<br>
  Many thanks</p>