how can i get only value of 'v' from the following url
http://www.youtube.com/watch?v=NMAYr709-9Y&feature=dir
i.e NMAYr709-9Y
with php
shishtawitch 0 Junior Poster in Training
Recommended Answers
Jump to PostAlthough you could use regex it would be better to use the following:
$url='http://www.youtube.com/watch?v=NMAYr709-9Y&feature=dir'; $var=explode('?v=',$url); $var=explode('&',$var[1]); echo $var[0];
All 3 Replies
zortec 11 Junior Poster
venkat0904 1 Junior Poster
cwarn23 387 Occupation: Genius Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.