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

2002-01-31 Thread Bas Jobsen
Hello, > $func = "make_" . $wat; > $temp = $$func($this); I think one $. $func = "make_" . $wat; $temp = $func($this); will work Bas Op donderdag 31 januari 2002 12:17, schreef u: > Hoi Bas, > > $func = "make_" . $wat; > > $temp = $$func($this); > > bvr. > > On Thu, 31 Jan 2002 11:55:12 +0100

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

2002-01-31 Thread Lars Torben Wilson
On Thu, 2002-01-31 at 02:55, 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

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

2002-01-31 Thread bvr
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);

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

2002-01-31 Thread Jeff Van Campen
Hey Bas, BV>But i would prefer something like BV>$temp=make_$wat($this); I think you might want something along these lines: eval("make_$wat($this);"); HTH -jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

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

2002-01-31 Thread Bas Jobsen
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 (

Re: [PHP] unset a function?

2002-01-30 Thread Bas Jobsen
Hi, Thanks all. I will rename the second function. Bas -- 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]

RE: [PHP] unset a function?

2002-01-30 Thread Philip Olson
> include_once() won't help. In fact, he is including each file only once. > He wants to have a function with the same name in each file. That's the > kicker... oh well that's silly, don't do that. also consider function_exists() regards, Philip Olson -- PHP General Mailing List (http://ww

Re: [PHP] unset a function?

2002-01-30 Thread CC Zona
In article , [EMAIL PROTECTED] (Philip Olson) wrote: > > > include("file1"); > > function_somename(); > > include("file2"); > > function_somename(); > > ?> > > > > file1 and contain a function definition, but the function in both files had

RE: [PHP] unset a function?

2002-01-30 Thread Rick Emery
en Cc: PHP List Subject: Re: [PHP] unset a function? This sounds like a job for include_once www.php.net/include_once regards, Philip Olson On Wed, 30 Jan 2002, Bas Jobsen wrote: > Hello, > > I have this: > include("file1"); > function_somename(); >

Re: [PHP] unset a function?

2002-01-30 Thread Philip Olson
This sounds like a job for include_once www.php.net/include_once regards, Philip Olson On Wed, 30 Jan 2002, Bas Jobsen wrote: > Hello, > > I have this: > include("file1"); > function_somename(); > include("file2"); > function_somename(); > ?> > > file1 and contain a function definition, b

Re: [PHP] unset a function?

2002-01-30 Thread Bas Jobsen
Hi, output: parse error, expecting `T_VARIABLE' or `'$'' Op woensdag 30 januari 2002 21:51, schreef Rick Emery: > what happened when you tried unset()? > > -Original Message- > From: Bas Jobsen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 30, 2002 2:52 PM > To: PHP List > S

RE: [PHP] unset a function?

2002-01-30 Thread Rick Emery
what happened when you tried unset()? -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:52 PM To: PHP List Subject: [PHP] unset a function? Hello, I have this: file1 and contain a function definition, but the function in both files had