title: How to remove content from url after question mark. preg_match or preg_replace?
body: <p>Im working on some function to grab few data from url with simple html dom.</p>
  
  <p>But one of the data is an image and image have question mark and some more info behind it.</p>
  
  <p>So example of url would be something like this.</p>
  
  <pre><code>http://somesite.com/uploaded/images/8.jpg?m=eSuQKgaaaa&amp;mh=t0i7nVhjZleTJ5Ih
  </code></pre>
  
  <p>So this content behind question mark is some sort of the code that makes images resized to small size.</p>
  
  <p>If i would just take this</p>
  
  <pre><code>http://somesite.com/uploaded/images/8.jpg
  </code></pre>
  
  <p>Images would be in bigger resolution and that's what i need.</p>
  
  <p>I know there is a function like preg_match but i never understood expressions in it.</p>
  
  <p>Is it possible that i somehow remove questionmark and all the content behind it ?</p>