的字符串值,我的字符串,是這樣的更換IFRAME
$string = ' <iframe width="560px" height="250px" src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBdVKAGo41VFI44444440l17aXhg&q=Space+Needle,Seattle+WA" allowfullscreen></iframe>';
我需要新的字符串替換數據屬性看起來像這樣
$newstring = '<iframe width="100%" height="100%" src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBdVKAGo41VFI44444440l17aXhg&q=Space+Needle,Seattle+WA" allowfullscreen></iframe>';
我不知道數據attbibutes但我的價值知道它永遠是100%
如何做到這一點?