title: How to remove last part of url in PHP
body: <pre><code> $url = explode('/', $articleimage);
   $articleurl = array_pop($url);
  </code></pre>
  
  <p>I have used the above method to get the last part of a URL.Its working.But I want to remove the last part from the URL and display the remaining part.Please help me.Here I am mentioning the example URL.</p>
  
  <pre><code>http://www.brightknowledge.org/knowledge-bank/media/studying-media/student-media/image_rhcol_thin     
  </code></pre>