On Tue, 2008-04-08 at 14:00 +1000, hce wrote:
> Hi,
>
> Is it possible for an array to point a function:
>
> Asignmanet
>
> $ArrayPointer = $this->MyFunction;
>
> Invoke:
>
> $ArraryPointer();
No, you can't do what you've done above. What you can do is...
<?php
$ptr = array( 'obj' => &$this, 'method' => 'MyFunction' );
$ptr['obj']->$ptr['method']();
?>
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php