Multiselect values not getting saved in hook_settings()? This is the code I have implemented in my module which is working fine!

/*
 * This is a helper()
 */
function MYMODULE_feeds($page_id = '') { 
  foreach($pagefeed['data'] as $feedval) {  
    $post_type[] = $feedval['type'];  
    if ($feedval['type'] == 'photo') {
      if(array_key_exists('message',$feedval)) {
          $messageFeed[] =  $feedval['message'];
          if ($timeshow == 1) {
            $created_statmp = $feedval['created_time'];
          }
          $i++;
      }
      if($i == variable_get('no_feeds')) {
          break;
      }
    }
  }
  $post_type_unique = array_unique($post_type);
  $post_type_unique_serial = array_values($post_type_unique);
  variable_set('post_type_unique_serial', $post_type_unique_serial);
  return theme('MYMODULE_feed_theme', array('pagefeeds' =&gt; $messageFeed, 'time_stamp' =&gt; $created_statmp));
}


After that I have done this in my module's admin.inc file

/*
 * Implements hook_settings()
 */
function MYMODULE_settings($form, &amp;$form_state) {
  $form['MYMODULE']['post_type'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; 'Select your post type(s) to show',
    '#default_value' =&gt; variable_get('post_type_unique_serial'),
    '#options' =&gt; variable_get('post_type_unique_serial'),
    '#multiple' =&gt; TRUE,
  );
  return system_settings_form($form);
}


Problem is that, I'm getting the values there, but when I'm saving that every field is saving the updated values, expect this field.

I'm not getting where I've made the mistake?
1) If variable_get('post_type_unique_serial') returns an array to populate the options, then it can not also be used for setting the default value, as this should be a single key within the array.

2) Generally it is good practice to use the same name for the variable as the form element if it is being used to set the default value eg $form['MYMODULE']['post_type'] and '#default_value' =&gt; variable_get('post_type'),