[snip]
eval('$return = $function($input);');
[/snip]
The problem is the quotes...the string is not truly being eval'd. Change
to double quotes
eval($return = $function($input););
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jay Blanchard wrote:
[snip]
eval('$return = $function($input);');
[/snip]
The problem is the quotes...the string is not truly being eval'd. Change
to double quotes
eval($return = $function($input););
thanks for the tip but i am sure you mean:
eval(\$return = \$function(\$input););
From: david [EMAIL PROTECTED]
i found a solution (hopefully) with:
if(function_exists($function)){
eval('$return = $function($input);');
}else{
// function does not exists
}
which works quit nicely for now. not sure if that's a good thing to do.
Why not just do this:
Cpt John W. Holmes wrote:
From: david [EMAIL PROTECTED]
i found a solution (hopefully) with:
if(function_exists($function)){
eval('$return = $function($input);');
}else{
// function does not exists
}
which works quit nicely for now. not sure if that's a good thing
On Tue, Nov 18, 2003 at 02:03:25PM -0800, david wrote:
:
: Cpt John W. Holmes wrote:
:
: From: david [EMAIL PROTECTED]
:
: if(function_exists($function)){
: eval('$return = $function($input);');
: }else{
: // function does not exists
: }
:
: which works quit nicely for
From: david [EMAIL PROTECTED]
Cpt John W. Holmes wrote:
From: david [EMAIL PROTECTED]
i found a solution (hopefully) with:
if(function_exists($function)){
eval('$return = $function($input);');
}else{
// function does not exists
}
which works quit nicely for
6 matches
Mail list logo