hello, I need a function. If i get the word http://rapidshare.com/ inside <td class=\"code\"> </td> i want to replace this with <td class=\"code\">Rapidshare is not allowed.</td> how can i do this?
If all you need to check for a specific word, you can use strstr(): if(strstr($content,"http://rapidshare.com/ ")) { $content=str_replace("http://rapidshare.com/ ","Rapidshare is not allowed.",$content); } If I have not understood you correctly, please explain more.