How to write accept only numeric and alphabetics

```
    function clean_post($_POST) {
        foreach($_POST as $key=>$value) {
             $cleaned_value = mysql_real_escape_string($value);
             $cleaned_value = str_replace('(','', $cleaned_value);
             $h_cleaned_array[$key] = $cleaned_value;
        }
        return $h_cleaned_array;
     }

```