| 
	
 | 
 Posted by Janwillem Borleffs on 05/16/05 22:33 
Mike wrote: 
> Hello, I'm attempting to create class in PHP that basically manages a 
> two seperate arrays.   However, when I attempt to add a new element to 
> the array, the array itself converts to the datatype of the element 
> I'm attempting to add instead of being an array. 
> 
> I am probably overlooking something very obvious, but here is my code. 
> The conversion takes place on this line: 
> 
> $this->$dError[$sKey] = true; 
> 
 
Class properties should be addressed like: 
 
$this->property, not as $this->$property 
 
So the above line becomes: 
 
$this->dError[$sKey] = true; 
 
 
Apply this modification throughout your code. 
 
 
JW
 
  
Navigation:
[Reply to this message] 
 |