arrays in a class

From: Date: Tue, 23 Apr 2002 20:27:46 +0000
Subject: arrays in a class
Groups: php.general 
Request: Send a blank email to php-general+get-94255@lists.php.net to get a copy of this message
Do I have to do anything different to access an array in a class? I have var $apcs = array(); at the top of my class I set it using $line1->adj_array[$pos] = (integer) $value; in the read-in part of the app that uses the class ($line1 is the object, $pos is just a number) Later on in the class I try to do this: ImageString($this->im,1,65,5,"apcs[0] = $this->apcs[0]",$this->black); and it prints out apcs[0] = Array[0] I've never had this happen before - I've always accessed members of an array by using the square brackets? I also tried [0][0] but that didn't work either. Can anyone see what I might be doing incorrectly? Thanks! -Natalie Natalie S. Leotta Information Management Services, Inc. (301) 680-9770 LeottaN@ims.nci.nih.gov

« previous php.general (#94255) next »