Parse Youtube ID from Youtube embed code
Could someone give me help with parsing out Youtube ID from youtube embed code
Input:
Output:Code:<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/q_9cL9hfZs4"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/q_9cL9hfZs4" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
Code:q_9cL9hfZs4
PHP CODE:
echo $match[1];

0 comments:
Post a Comment