note 30978 deleted from language.oop by et

From: Date: Sat, 24 Jan 2004 15:20:29 +0000
Subject: note 30978 deleted from language.oop by et
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-64114@lists.php.net to get a copy of this message
Note Submitter: rjkaes@flarenet.com ---- The note and example indicates that arrays cannot be used to initialize class variables, but I've used the following code without a problem: class Foo { function print_field($n) { print $this->_fields[$n]; } var $_fields = array('field1', 'field2', 'field3'); } $foo = new Foo; $foo->print_field(1); Perhaps the note/example in the documentation needs to be clarified.

« previous php.notes (#64114) next »