variable method names
| From: | Kendrick Vargas | Date: | Tue, 13 Feb 2001 16:26:26 +0000 |
| Subject: | variable method names | ||
| Groups: | php.pear | ||
| Request: | Send a blank email to php-pear+get-1329@lists.php.net to get a copy of this message | ||
I was wondering what would be the correct way to write a variable method
name within a class function:
$this->$method($value);
or
$this->{$method}($value);
? Many thanks in advance :-)
-peace
--- BEGIN GEEK CODE BLOCK ----------+----------
GAT d- s:+ !a C++$ UL/S/I/B++++$ P+ | "In the ongoing battle between objects
L++ E- W+(+++) N K- w(---) O-- M@ | made of aluminum going hundreds of
V(--) PS+++ PE Y+ PGP@ t++ 5 X+ R- | miles per hour and the ground going
tv+ b- DI++++ D+(+++) G e>++ h--- | zero, the ground has yet to lose."
r++ z+>+++ - END GEEK CODE BLOCK ---+