note 10034 modified in language.variables.variable by danbrown
| From: | danbrown@php.net | Date: | Wed, 24 Jun 2009 17:03:01 +0000 |
| Subject: | note 10034 modified in language.variables.variable by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157423@lists.php.net to get a copy of this message | ||
By the way...
Variable variables can be used as pointers to objects' properties:
<?php
class someclass {
var $a = "variable a";
var $b = "another variable: b";
}
$c = new someclass;
$d = "b";
echo $c->{$d};
?>
outputs: another variable: b
--was--
By the way...
Variable variables can be used as pointers to objects' properties:
<?
class someclass {
var $a = "variable a";
var $b = "another variable: b";
}
$c = new someclass;
$d = "b";
echo $c->{$d};
?>
outputs: another variable: b
http://php.net/manual/en/language.variables.variable.php