How can I add a class to each option?

how can i add a class to each option? this is the PHP code, see screenshot in the description, can you help me modify this code, thanks

            <?php 
                if($params->get('cat_select_type','0')==1){
                    $cat_sel = '<select  class="inputbox" id="se'.$module->id.'_cat_0" name="se_cats[]" onchange="se'.$module->id.'_getFields(this.value);"><option value="">'.JText::_('PLEASE_SELECT_CATEGORY').'</option>';
                    foreach($categories as $cat){ 
                        $c_name = str_ireplace("'", "&apos;", $cat->name);
                        for($lev=0;$lev<$cat->level;$lev++){
                            $c_name ="- ".$c_name;
                        }                       
                        $cat_sel .= '<option value="'.$cat->id.'">'.$c_name.'</option>';
                    }
                    $cat_sel .= '</select>';
                    echo $cat_sel;
                }else{
                    $cat_sel = '<select  class="inputbox" id="se'.$module->id.'_cat_0" name="se_cats[]" onchange="se'.$module->id.'_new_cat(0,this.value,new Array());se'.$module->id.'_getFields(this.value);"><option value="">'.JText::_('PLEASE_SELECT_CATEGORY').'</option>';
                    foreach($categories[0] as $cat){
                        $cat_sel .= '<option value="'.$cat->id.'">'.str_ireplace("'", "&apos;", $cat->name).'</option>';
                    }   
                    $cat_sel .= '</select>';
                    echo $cat_sel;
                }                   
                ?>

screenshot