Passing a var to a function using add_filter

Hello, as my code below shows, I’m trying to call add_filter using a function. But as add_filter requires two strings, I can’t pass a function name with a variable. (see Below)

function getallopts($options) {
foreach $options as $opt {
add_filter('pre_site_option_'.$opt, ccx_options_activated_modules($opt));

This is drivinig me up the wall, and the examples on wordpress’s docs show vague examples using an array.

Maybe Aaron can lend a hand here?