Re: Passing an indefinite number of parameters by reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops, returning the wrong thing. Corrected below...

function call_function($function_name, &$vars)
{
   $code = '$retval = '.$function.'(';
   $params = array();
   foreach (array_keys($vars) as $key)
       $params[] = '$var['.$key.']';
   $code .= implode(',', $params);
   $code .= ');';
   eval($code);
   return $retval;
}

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux