Re: [PHP] Setting counter in variable name within foreach loop

2003-11-24 Thread Curt Zirzow
* Thus wrote Jake McHenry ([EMAIL PROTECTED]): > Is this possible? I've been messing with this for about an hour now, > searching on google for about half hour. Here is what I want to do: > > foreach ($array as $key => $value) > { > $value = explode("|", $value); > $counter = 0; You're reseti

RE: [PHP] Setting counter in variable name within foreach loop

2003-11-23 Thread Nigel Jones
TED] >> -Original Message- >> From: Jake McHenry [mailto:[EMAIL PROTECTED] >> Sent: Monday, November 24, 2003 4:55 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] Setting counter in variable name within foreach loop >> >> >> Is this possible? I've

[PHP] Setting counter in variable name within foreach loop

2003-11-23 Thread Jake McHenry
Is this possible? I've been messing with this for about an hour now, searching on google for about half hour. Here is what I want to do: foreach ($array as $key => $value) { $value = explode("|", $value); $counter = 0; if ($value[7] == "Yes") { $counter++; $date_$counter = $value[