Re: Variable function names

From: Date: Tue, 11 Jul 2000 18:31:09 +0000
Subject: Re: Variable function names
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5974@lists.php.net to get a copy of this message
On Tue, 11 Jul 2000, Jay D. Mumper wrote: > I would like to be able to do something like this, rather than > use a switch structure: <snip> > My one hangup is the function name - can it be variable? > And if so, what syntax do I need? Variable functions are your friend. function foof($var) { echo "Var is: $var"; } $cbname = 'foof'; $cbname('Hello, world!'); Matt

« previous php.general (#5974) next »