I have my videos wrapped in a custom div. It looks like this:-
<div class="yt">
<iframe>....Video code....</iframe>
</div>
I want to remove <div class="yt">
and </div>
but keep the iframe. I tried using preg_replace
using this code:-
$content = preg_replace('#<div class="yt">(.*?)</div>#', '', $content);
return $content;
This removes the whole div. Can somebody help me?
Desired output
<iframe>....Video code....</iframe>