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

Reply via email to