Hello!
I've been banging my head against the wall for a while now, and though I'd post a question here.
I'm trying to call a function with a dynamic number of parameters. The function is not the problem, the call is. I can't seem to find a good (or even, working) way to do this properly.
<?
$x = "testf";
function testf () {
foreach (func_get_args() AS $key => $val)
print "$key - $val<br>";
}
$args = array('test', 'moretest');
eval($x($args[0], $args[1]));
?>
Now, this works as expected. Problem is that the $args[] may be variable. Is there an easy way to use $args[] as parameters to $x (testf()) ?