Re: [PHP] Specific References Incident

2002-01-10 Thread Rasmus Lerdorf
Well, just use the array index. ie. $a = array(1,2,3,4,5); foreach($a as $k=>$v) { $a[$k]++; } This is obviously going to increment each element in the array, right? Just do the same in your case. One has to wonder why you are using arrays of objects though... -Rasmus On

Re: [PHP] Specific References Incident

2002-01-10 Thread Ken Kinder
Nope. Tried that too. On Thursday 10 January 2002 05:18 pm, Rasmus Lerdorf wrote: > Use a while(list()=each()) loop. > > On Thu, 10 Jan 2002, Ken Kinder wrote: > > Negative. > > > > On Thursday 10 January 2002 04:54 pm, Mark wrote: > > > On Thu, 10 Jan 2002 16:49:45 -0700, Ken Kinder wrote: > > >

Re: [PHP] Specific References Incident

2002-01-10 Thread Rasmus Lerdorf
Use a while(list()=each()) loop. On Thu, 10 Jan 2002, Ken Kinder wrote: > Negative. > > On Thursday 10 January 2002 04:54 pm, Mark wrote: > > On Thu, 10 Jan 2002 16:49:45 -0700, Ken Kinder wrote: > > >That's what I had thought too, but no: > > > > > >Parse error: parse error, expecting `T_VARIAB

Re: [PHP] Specific References Incident

2002-01-10 Thread Ken Kinder
Negative. On Thursday 10 January 2002 04:54 pm, Mark wrote: > On Thu, 10 Jan 2002 16:49:45 -0700, Ken Kinder wrote: > >That's what I had thought too, but no: > > > >Parse error: parse error, expecting `T_VARIABLE' or `'$'' in > >/home/ken/Projects/kwidgets/widgets.inc on line 74 > > how about thi

Re: [PHP] Specific References Incident

2002-01-10 Thread Mark
On Thu, 10 Jan 2002 16:49:45 -0700, Ken Kinder wrote: >That's what I had thought too, but no: > >Parse error: parse error, expecting `T_VARIABLE' or `'$'' in >/home/ken/Projects/kwidgets/widgets.inc on line 74 how about this: foreach ($this->children as $key => $value) { $child=&$this->children

Re: [PHP] Specific References Incident

2002-01-10 Thread Ken Kinder
That's what I had thought too, but no: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/ken/Projects/kwidgets/widgets.inc on line 74 On Thursday 10 January 2002 04:51 pm, Martin Towell wrote: > does this work?? change > foreach ($this->children as $child) { > to >

RE: [PHP] Specific References Incident

2002-01-10 Thread Martin Towell
does this work?? change foreach ($this->children as $child) { to foreach ($this->children as &$child) { -Original Message- From: Ken Kinder [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 10:44 AM To: [EMAIL PROTECTED] Subject: [PHP] Specific References Incident I