note 9451 added to Variable variables

From: Date: Fri, 03 Nov 2000 20:36:47 +0000
Subject: note 9451 added to Variable variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-7350@lists.php.net to get a copy of this message
Kristi: There is no need for the braces for variable object names...they are only needed by an ambiguity arises concerning which part of the reference is variable...usually with arrays. class Schlemiel { var $aVar = "foo"; } $schlemiel = new Schlemiel; $a = "schlemiel"; echo $$a->aVar; This code outputs "foo" using PHP 4.0.3. Hope this helps... - Jordan http://www.php.net/manual/language.variables.variable.php

« previous php.notes (#7350) next »