Extract the YouTube Video ID from a URL in PHP

1
2
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Extract the YouTube Video ID from a URL in PHP

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.