In regular expressions, the question mark has a special value (zero or 1 of the last character stated). To make it equal literally "?", put a backslash in front of it.
ereg_replace("\?", "", $test);
In this case, I don't think ereg_replace is right for you, though. It can be done the way you were trying using str_replace(), not ereg_replace().