OO method inside a variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everybody,
i'm trying to apply a method to an object getting its name from a variable, that i obtain parsing an XML file.

For example:

$object = new Class;
$method = "row()"; #I'm getting this from the XML parser
$object->$method; #I've an error here...

Obviously the method inside the class exists.
How can i do it?
Thanks a lot in advance.

Simone Nanni


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux