note 7892 added to Classes and Objects
| From: | chris at dp dot net | Date: | Fri, 18 Aug 2000 17:50:45 +0000 |
| Subject: | note 7892 added to Classes and Objects | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2473@lists.php.net to get a copy of this message | ||
If I have a class:
class someClass
{
$var arOne;
$var arTwo;
// And I load the two arrays in the constructor.
function someClass()
{
$this->arOne = array( "", "", ... );
$this->arTwo = array(...);
}
}
Why is it that if I try to access one of the arrays in a member function they invariably switch data
around? Like arOne will print arTwo stuff and arTwo will also print arTwo stuff. Do you have to
declare a size for the array since it is in the class as it is?
Thanks.
http://www.php.net/manual/language.oop.php