Re: variable function call (Re: [PHP] unset a function?)

From: Date: Thu, 31 Jan 2002 11:17:24 +0000
Subject: Re: variable function call (Re: [PHP] unset a function?)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82910@lists.php.net to get a copy of this message
Hoi Bas, $func = "make_" . $wat; $temp = $$func($this); bvr. On Thu, 31 Jan 2002 11:55:12 +0100, Bas Jobsen wrote: >Hello, > >> Thanks all. I will rename the second function. > >Now if have: > >if($wat=="naam")$temp=make_naam($this); >else if($wat=="anderenaam")$temp=make_anderenaam($this); >//etc.. > >But i would prefer something like >$temp=make_$wat($this); > >How can i do this? > >Tnx, > >Bas > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#82910) next »