Welcome Guest, Not a member yet? Register   Sign In
preg_replace how

is there a way to do this?
on preg_replace
Quote:$find = "web design services";
$string = "This is linked to Web design services . Find out more.";

the output should be:

This is linked to Web$design$services . Find out more.

and also preg replace to revert it back to

This is linked to Web design services
Please help on my problem

this is my code for preg replace but i dont know how to put the $ symbol between the spaces of match string
$finalstring = preg_replace('/('.$find.')\b/iU', '<a href="asdf.com">\1</a>', $string,-1,$i);

Theme © iAndrew 2016 - Forum software by © MyBB