RE: [PHP] looping through array with list()/each()

2002-09-25 Thread Kevin Porter
Thank you, thank you, thank you. And, er, "D'oh!" :o) - Kev > -Original Message- > From: Karl Phillipson [SMTP:[EMAIL PROTECTED]] > Sent: 25 September 2002 12:13 > To: [EMAIL PROTECTED] > Subject: RE: [PHP] looping through array with list()/each(

RE: [PHP] looping through array with list()/each()

2002-09-25 Thread Karl Phillipson
while ( list($key, $val) = each($ser) ); <--- ; should not be here -Original Message- From: Kevin Porter [mailto:[EMAIL PROTECTED]] Sent: 25 September 2002 12:13 To: Kevin Porter; '[EMAIL PROTECTED]' Subject: RE: [PHP] looping through array with list()/each() I meant $ke

RE: [PHP] looping through array with list()/each()

2002-09-25 Thread Kevin Porter
I meant $key and $val of course :o) - Kev > -Original Message- > From: Kevin Porter [SMTP:[EMAIL PROTECTED]] > Sent: 25 September 2002 12:00 > To: '[EMAIL PROTECTED]' > Subject: [PHP] looping through array with list()/each() > > OK so I've d

[PHP] looping through array with list()/each()

2002-09-25 Thread Kevin Porter
OK so I've done this hundreds of times, but this time I cannot get it to work. Please cast an eye over the following code and output and tell me why $k and $v are not being set: Code: - $ser = array( 'first', 'second', 'third', 'fourth', 'fifth' ); reset($ser); whi