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(",", array_flip($cb));

> // by the way this: $acc=.$key would be a valid command? like the c++ $a =+
> $b
>

Other way: $acc.=$key, $a+=b

> Rom
>

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to