We are looking to view and modify the particular element using Simple PHP DOM,
<?php
include('../../../../dom/simple_html_dom.php');
$html = new simple_html_dom();
$html->load_file('http://www.google.com');
foreach ($tags as $tag)
{
//something like that match with $string, if value found then the particular element edited by the <u>$string</u>.
if(stristr($tag->innertext,$string)) {}
}
echo $html ;
?>
We want to get all HTML elements, in array. We have to check each element, and if one is matching with our data, then we moderate that particular element.