i just want to know if it possible to create class properties as variable variables
i try with his code,
in the class:
class SUPPR_CHAMP {
function SUPPR_CHAMP($VAR,$VAL)
{
$this->${$VAR}=$VAL;
echo "<TR>\n";
echo "<TD>var:<TD>$VAR\n";
echo "<TR>\n";
echo "<TD>val:<TD>" . $this->${$VAL} . "\n";
echo "<TR>\n";
echo "<TD>val call direct:<TD> " . $this->nam_prop . "\n";
}
}
in the code:
require 'class_SUPPR_CHAMP.inc';
$test=new SUPPR_CHAMP('nam_prop','val_prop');
echo "<TR><TD>val in code:<TD> " . $test->nam_prop . "\n";
i can get the value but in $test->$nam_prop ?!?
Please Help