What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-22 18:51:12
php convert link to embed youtube
function convertYoutube($string) { return preg_replace( "/\s*[a-zA-Z\/\/:\.]*youtu(be.com\/watch\?v=|.be\/)([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i", "<iframe src=\"//www.youtube.com/embed/$2\&qu... Add solution -
PHP 2021-10-18 03:28:04
php get embed code from youtube url
function convertYoutube($string) { return preg_replace( "/\s*[a-zA-Z\/\/:\.]*youtu(be.com\/watch\?v=|.be\/)([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i", "<iframe src=\"//www.youtube.com/embed/$2\&qu... Add solution