Forum Moderators: coopster
I need the function to replace G(any number here from 1 to 1000)X to, for example webmasterworld
<? /* webmasterworld #3559977 replace number 1-1000 to string */ $search = "1000 1001 9999 5 598 1000000";//string to search $pattern = "/\b1000\bŠ\b[1-9]{1}[0-9]{1,2}\bŠ\b[1-9]{1}\b/"; $replace = "webmasterworld"; echo preg_replace($pattern, $replace, $search);
?>
-khanh