RE: Array's in classes

From: Date: Fri, 24 Aug 2001 08:37:43 +0000
Subject: RE: Array's in classes
Groups: php.general 
Request: Send a blank email to php-general+get-64220@lists.php.net to get a copy of this message
Can't help too much without more code, but the diagnostics I'd use would be foreach() and count() to find out what is there rather than seeing if what I expect to be there actually is. Tim Ward ---------- From: Scott Mebberson [SMTP:scott@redbluedesign.com] Sent: 24 August 2001 00:52 To: php-general@lists.php.net Subject: Array's in classes Hi Guys, I have written a class in which it uses the global command to get the value of a variable from outside of this class which I use within the class. I have recently changed this variable to an array and added 5 extra keys to this array. It is a string indexed array. In now seems as though PHP wont import the array. It is really weird though because if I access the key of an array such as $database["hostname"] is just echo's nothing at all to the browser. It also echo's nothing to the browser if I use $database[0]. But, if I echo just $database to the browser it returns "Array" ? Does anybody have any idea of why this is happening? Thanks Scott.

« previous php.general (#64220) next »