PHP Function: Get the YouTube Video Id from a YouTube URL

Here is how you can get the YouTube Video ID from a URL no matter how many extra parameters get passed along with it. function getYouTubeIdFromURL($url) { $url_string = parse_url($url, PHP_URL_QUERY); parse_str($url_string, $args); return isset($args[‘v’])…

View →