Posted by macca on 11/04/07 15:21
Unless I am misunderstanding what you are looking for, as I cant see why this is so complex, why not just use a simple srt_replace function? <?php $find = array('cat','tree'); $replace = array('dog','alligator'); $phrase = "a cat climbs a tree"; echo str_replace($find,$replace,$phrase); //outputs "a dog climbs a alligator" ?>
[Reply to this message]
Copyright © 2005-2006 Powered by Custom PHP Programming