| 
	
 | 
 Posted by Colin McKinnon on 08/22/05 14:03 
Anze wrote: 
 
> Hi! 
>  
> I have just fixed my CMS so it works on PHP5 (it worked without problems 
> on PHP4 but gave weird errors on PHP5).  
<snip> 
> This solved the problem: 
>  
> echo ("BEFORE: ".count($this->someLargeArrayWithObjects)); // outputs 11 
> $keys=array_keys($this->someLargeArrayWithObjects); 
> foreach ($keys as $key) 
> { 
>   $value=&$this->someLargeArrayWithObjects[$key]; 
>   $a=$value['object']->someFunction(); 
> }; 
> echo ("AFTER: ".count($this->someLargeArrayWithObjects)); // outputs 11 
> 
 
It doesn't really solve the problem but did you try: 
 
foreach ($this->someLargeArrayWithObjects as $key=>$value) 
{ 
  $a=someLargeArrayWithObjects['key']['object']->someFunction(); 
} 
 
C.
 
  
Navigation:
[Reply to this message] 
 |