RE: [PHP] variable functions: empty/isset/unset invalid?

From: Date: Mon, 07 May 2001 17:10:03 +0000
Subject: RE: [PHP] variable functions: empty/isset/unset invalid?
Groups: php.general 
Request: Send a blank email to php-general+get-51778@lists.php.net to get a copy of this message
Change the parens around $var to curly braces: if ($foo{$var}) print 'worked.'; Kirk > -----Original Message----- > From: Philip Olson [mailto:philip@cornado.com] > 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.';

« previous php.general (#51778) next »