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, 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: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
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]

Reply via email to