note 13540 added to language.variables.variable.php

From: Date: Thu, 21 Jun 2001 07:19:21 +0000
Subject: note 13540 added to language.variables.variable.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14510@lists.php.net to get a copy of this message
Expanding on the variable function note a bit: when using variable methods the syntax is a bit different. to call a function whose name is contained in $var_func: $this->$var_func($parm1, $parm2); thus... class A { function f1($parm){echo $parm;} } $objA = new A(); $var_func = 'f1'; $objA->$var_func("moo"); produces 'moo' http://www.php.net/manual/en/language.variables.variable.php

« previous php.notes (#14510) next »