There is a certain array which gets from base.
$a = 'текст https://www.youtube.com/watch?v=2B-nbLVqDjY еще текст {smiles} '; We need a function that will look for the YouTube link in the array, take the identifier and replace the link with
<iframe width="560" height="315" src="https://www.youtube.com/embed/2B-nbLVqDjY" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> rummaged a floor of Google, found nothing sensible. help)