sniperscope Posted July 29, 2010 Share Posted July 29, 2010 Hi i wrote a find and replace code but my code replace last value of array and skip the first, second.... values in the array. Please give me an idea because i stack with this code. Regards $KeyWord = explode("\n", $RowGetWords['KEYWORDS']); $Replace = explode("\n", $RowGetWords['ReplaceTo']); for($i=0; $i<count($KeyWord); $i++){ $pattern = $KeyWord[$i]; $replace = "<a href=\"" .$URL. "\" target=\"_blank\" >" .$Replace[$i]. "</a>"; $html = str_replace($pattern, $replace, $Row['MessageBody']); } Quote Link to comment Share on other sites More sharing options...
sniperscope Posted July 29, 2010 Author Share Posted July 29, 2010 hey guys have any idea and clue. Quote Link to comment Share on other sites More sharing options...
sniperscope Posted July 30, 2010 Author Share Posted July 30, 2010 Forget it. I figured out Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.