Code
Result

PHP function to convert youtube URL into HTML iframe

This function will convert all URLs found in a plain text into HTML iframe.

It works with both youtube URL long and short format.