Re: [PHP4BETA] Fun. call via string

[email protected] (Andreas Pour)
Newsgroups php.version4
Message-ID <[email protected]>
Dariusz Malinowski wrote:
> 
> hi there
>     is it possible to call function by passing its name (ie.
> CallUserFunction ("myFun", param1, param2)) ?

Sure:

  function CallUserFunction($func, $param1, $param2)
  {
    $func($param1, $param2);
  }

Ciao,

Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.