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]();
I have tried this this, it will
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:
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);
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 something like;
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:
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:
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);
7 matches
Mail list logo