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
>> $date_$counter = $value[1]; <-- this is line 33 >> $dest_$counter = $value[3]; >> $dep_$counter = $value[4]; you can't do that you'd have to do something like $mydate[$counter] = $value[1]; _ Nigel Jones [EMAIL PROTECTED] >> -Original Message- >> Fro