Read One URl Parameter using php
<p>I want to read one parameter from a specific URl : </p>

<p>Like : <a href="http://www.youtube.com/watch?v=MrOiL74P-9E&amp;feature=watch" rel="nofollow">http://www.youtube.com/watch?v=MrOiL74P-9E&amp;feature=watch</a></p>

<p>Output should be : MrOiL74P-9E</p>

<p>I try to search and I found this function : </p>

<pre><code>function remove_query_part($url, $term)
{
    $query_str = parse_url($url, PHP_URL_QUERY);
    if ($frag = parse_url($url, PHP_URL_FRAGMENT)) {
        $frag = '#' . $frag;
    }
    parse_str($query_str, $query_arr);
    unset($query_arr[$term]);
    $new = '?' . http_build_query($query_arr) . $frag;
    return str_replace(strstr($url, '?'), $new, $url);
}
</code></pre>

<p>This function just remove one parameter and return the rest. Can anyone edit this function to return just the video ID and Ignore whatever else in the URL.</p>
