Tutorialsplane

Php replace iframe by amp-iframe


Php replace iframe by amp-iframe It is very simple and easy to replace normal iframe to amp-iframe in Php. here in this article we are going to explain how to convert iframe tag to amp iframe.


Php replace iframe by amp-iframe Example

You can replace iframe tag by amp-iframe tag simply using the below code-

Php replace iframe by amp-iframe Example:

<?php $content = "Hello world <iframe src='xyz.com/abc.htm'?> ";
$resultTemp = str_replace('

The above code will convert all occurrence of iframe to google amp iframe tag.

Php - FAQ