Welcome Guest, Not a member yet? Register   Sign In
exclude from being replaced
#1

[eluser]basty_dread[/eluser]
hi guys. please help me with this problem thank you very much
how to exclude the one with link from being replaced?

Code:
$find = "web design";
$string = "WEB DESIGN Web Design web design <a href='google.com'>Web design las vegas</a>";
$finalstring = preg_replace('/('.$find.'\b)/iU', '<a href="http://google.com">\1</a>', $string,-1,$i);
echo $finalstring;
echo '<br />'.$i;
#2

[eluser]basty_dread[/eluser]
Thanks for helping.
#3

[eluser]basty_dread[/eluser]
please help regexp experts.. pls. help.. tnx a lot




Theme © iAndrew 2016 - Forum software by © MyBB