Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get embed code from youtube url

preg_replace("/s*[a-zA-Z//:.]*youtube.com/watch?v=([a-zA-Z0-9-_]+)([a-zA-Z0-9/*-\_?&;\%=.]*)/i","<iframe width="420" height="315" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>",$post_details['description']);
Source by # #
 
PREVIOUS NEXT
Tagged: #php #embed #code #youtube #url
ADD COMMENT
Topic
Name
4+4 =