Change the parens around $var to curly braces:
if ($foo{$var}) print 'worked.';
Kirk
> -----Original Message-----
> From: Philip Olson [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] variable functions: empty/isset/unset invalid?
>
> This does not work as expected (as I expect it at least) and gives the
> following error. This seems to result with use of empty(),
> isset(), and
> unset(), perhaps others :
>
> Call to undefined function: empty()
>
> When using :
>
> $foo = 'empty';
> if ($foo($var)) print 'worked.';
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]