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 PostYou can use a regular expression to capture the part of the url you need.
preg_match('#journal/[a-zA-Z0-9]+\-([a-zA-Z0-9]+)/#', $string, $matches); $match = $matches[1];
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.