due to xhtml restrictions, i have to remove all html entities that are not & > < ",etc.. decimal entities ({ etc) are not the problem, btw.
tried this code
preg_replace('/&((?!amp)|(?!gt)|(?!lt)|(?!quot));/i','',$i);
but it fails..
also tried preg_replace_callback but it fails since the function that replaces the text is a class method.
and last of all, no luck with the /e flag to execute mulitple lines of php code..
please help..