Here’s a more fool proof way than using regex.
<?php
$url = "http://www.youtube.com/watch?v=N22qGmYIUVU&feature=g-logo";
$parts = parse_url($url);
parse_str($parts['query'], $query);
print_r($query); // $query['v'] is what you want
?>
1
solved Value from a url using php [closed]