I'm currently trying to filter alphanumeric characters only. Therefore, I've tried a following Zend Function,
$filter = new Zend_Filter_Alnum(array('allowwhitespace' => true));
$return = $filter->filter('This is (my) content: 123');
This actually amazing but the issue is here I need to replaced the characters with white space. For example if I enter "Hel#o wor*d" it has to be "Hel o wor d". Aslo I've tried php str_replace function it's actually good but I've to define there a loads of invalid characters. Could any please tell me how to do this easily ?