preg_replace To Make A Link

Hey,

I’m using the preg_replace command to try to replace Some Words with Some Words when users submit to a message board script I’m writing. This is the code I have to try to do it:

$postText = preg_replace("!!Usi", “”, $postText);
$postText = preg_replace("!!Usi", “
”, $postText);

However, that code is not working. It works if they try to only add one link, but when they try adding more than one link in their post, it doesn’t work anymore. Is there a more proper way to be doing this?

Any help would be great,

Thanks,

Nick Giancola

Anyone? Please… I’m really stumped.

-Nick

You could look into using: http://www.php.net/str_replace

Sponsor our Newsletter | Privacy Policy | Terms of Service