Tanks a lot!
This was exactly that i wanted!
Cheers
David Otton wrote:
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote:
I have folowing function which they are a member in a class.
function foo(){
something
}
function zoo(){
something else
}
and i have a array such:
$test = array(1=>foo,2=zoo);
Tanks a lot!
this is exactly that i want!!
Cheers
Michael Sims wrote:
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote:
$test = array(1=>foo,2=zoo);
and i want to call the fuction foo() and zoo something like;
$object->$test[1]();
I've never used this myself, but this should work:
call_user_f
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote:
>$test = array(1=>foo,2=zoo);
>
>and i want to call the fuction foo() and zoo something like;
>
>$object->$test[1]();
I've never used this myself, but this should work:
call_user_func(&$object, $test[1]);
See:
http://www.php.net/manual/en/function
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote:
>I have folowing function which they are a member in a class.
>
>function foo(){
>something
>}
>
>function zoo(){
>something else
>}
>
>
>and i have a array such:
>
>$test = array(1=>foo,2=zoo);
>
>and i want to call the fuction foo() and zoo somethin
I got this error:
Parse error: parse error, unexpected '{' in ...
Cheers
John W. Holmes wrote:
adam wrote:
Hi!
I have folowing function which they are a member in a class.
function foo(){
something
}
function zoo(){
something else
}
and i have a array such:
$test = array(1=>foo,2=zoo);
adam wrote:
Hi!
I have folowing function which they are a member in a class.
function foo(){
something
}
function zoo(){
something else
}
and i have a array such:
$test = array(1=>foo,2=zoo);
and i want to call the fuction foo() and zoo something like;
$object->$test[1]();
Try:
{$object->$tes
6 matches
Mail list logo