I have a function to find and replace multiple items and cannt for the life of me find it or get my head around how to do it Basically if i do a preg_match_all($match,$haystack,$matches); how can i loop through the $matches and run a replace using the $matches[] as offset. can any one offer any help driving me nuts