Get last URI segment excluding query string
<p>I have an URL say: <code>www.abc.com/blog/2012/12/register-car?w=Search&amp;searchDmv=Go</code>. I want to extract the string <code>register-car</code> from it using php code. Please help.</p>
