scrupul0us wrote:Not sure exactly sure how you have that for loop setup to accept the extra params
You mean the 'param1', 'param2' values? I didn't know what your specific application does, so I just threw those in there for placeholders to show that you can pass extra arguments if needed.
If the parameters are function-specific, you could have even more fun with arrays:
$funcs = array (
array(
'func' => 'searchA',
'params' => array('param1', 'param2')
),
array (
'func' => 'searchB',
'params' => array('param3', 'param4')
),
/* etc. */
);
for($i = 0, $results = FALSE; $results == FALSE && isset($funcs[$i]); $i++) {
$results = call_user_func_array($funcs[$i]['func'], $funcs[$i]['params']);
}