Forum Moderators: coopster
$html='
<b> download firefox program now from this link <a href="http://www.download8.com/firefox">download firefox program now</a><b><br>';
echo $html;
$words2=array("firefox","program");
$links2=array("http://www.firefox.com","http://www.soft.com");
for ($i=0;$i<count($words2);$i++){
$words[]="/ ".$words2[$i]." /i";
$links[]=" <a href='$links2[$i]' style='color:red;'>$words2[$i]</a> ";
}
$count=5;
$html=preg_replace($words,$links,$html,$count);
echo $html;
$html='
<b> download firefox program now from this link <a href="http://www.download8.com/firefox">download firefox program now</a><b><br>';