Re: [PHP] srtoring user selection on the database...

2001-01-18 Thread Ignacio Vazquez-Abrams
On Thu, 18 Jan 2001, Ignacio Vazquez-Abrams wrote: > On Thu, 18 Jan 2001, Ignacio Vazquez-Abrams wrote: > > > Even shorter: > > > > $acc=implode(",", array_flip($cb)); > > > > Assuming, of course, that the original values are unique (oops!). > > Oh wait: $acc=implode(",", array_keys($cb)); THA

Re: [PHP] srtoring user selection on the database...

2001-01-18 Thread Ignacio Vazquez-Abrams
On Thu, 18 Jan 2001, Ignacio Vazquez-Abrams wrote: > Even shorter: > > $acc=implode(",", array_flip($cb)); > Assuming, of course, that the original values are unique (oops!). -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-m

Re: [PHP] srtoring user selection on the database...

2001-01-18 Thread Ignacio Vazquez-Abrams
On Thu, 18 Jan 2001, Romulo Roberto Pereira wrote: > Hey!!! thank you for your answer... what you think about this solution: > > while(list($key, $val) = each($cb)) { > if ($val == 1 && $key != 0) { > $acc = $key; > } else { > $acc = $acc.",".$key; > } > > } > Even shorter: $acc=implode(",

Re: [PHP] srtoring user selection on the database...

2001-01-18 Thread jeremy brand
> while(list($key, $val) = each($cb)) { > if ($val == 1 && $key != 0) { > $acc = $key; > } else { > $acc = $acc.",".$key; > } This looks syntactically correct. > } > // by the way this: $acc=.$key would be a valid command? like the c++ $a =+ > $b I usually use (for a string): .= that wou

Re: [PHP] srtoring user selection on the database...

2001-01-18 Thread Romulo Roberto Pereira
AIL PROTECTED]> To: Romulo Roberto Pereira <[EMAIL PROTECTED]> Cc: php-general <[EMAIL PROTECTED]> Sent: Thursday, January 18, 2001 5:27 PM Subject: Re: [PHP] srtoring user selection on the database... Yes you can. I hate to say it, but there isn't any one answer. You are going

Re: [PHP] srtoring user selection on the database...

2001-01-18 Thread jeremy brand
Yes you can. I hate to say it, but there isn't any one answer. You are going to need to keep track of the user (using most any form of sessions). Once you can track the user, then use that tracking code to store the data. You will have to decide how you want to store it in your DB. You could