Possible Duplicate:
I need to iterate a loop to every time find the string appearing after a particular string say “if(OLD.”, then which PHP function will be helpful for me?
This is the string
BEGIN
IF (NEW.name != OLD.name) THEN
INSERT INTO jos_menuaudit
set menuid=OLD.id, oldvalue = OLD.name, newvalue = NEW.name, field = "name";
END IF;
IF (NEW.alias != OLD.alias) THEN
INSERT INTO jos_menuaudit
set menuid=OLD.id, oldvalue = OLD.alias, newvalue = NEW.alias, field = "alias";
END IF;
END
in which I am searching the particular word after " IF (NEW.", and after that particular others strings should not be displayed, hence whenever in a loop it finds " IF (NEW." I must get a word just next to it. And in this way an array should be ready for to use.