How to get [ ] values from a multicheckbox array?
===

in [this question][1] i have learned how to make a implode.

But now i need something a little more complicated (i think) and after searching and tried several options made by me i'm here asking you some help...

With a multichekboxs i have checked some options, in this case i'm going to call categories.
each category name as a category id and the value for check is 1 for true, and 0 for null.

So, this is the array after a some checkcategories:


        <?php $categoriesblog2 = of_get_option('check_categories' ); ?>
        
    <?php print_r($categories); ?>
        
        Array ( [13] => 1 [7] => 1 [6] => 1 [23] => 0 [12] => 0 [5] => 0 [11] => 0 [22] => 0 [3] => 0 [14] => 0 [1] => 1 [17] => 0 [10] => 0 [18] => 1 )

 
If i make `<?php echo implode(', ',of_get_option('check_categories' )); ?>` 

this is the result: `1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1`


Ok... but i don't want this results, what i need is for checkboxes = 1 i need to get only the category Id's, in this case exactly like this, but how?: `13,7,6,1` 


Thanks,
nelson

  [1]: http://stackoverflow.com/questions/11671733/how-to-separate-array-with-commas