title: Array of checkboxes not saving in WordPress widget
body: <p>This is my code for the widget:</p>
  
  <pre><code> function form( $instance ) {
  
              $instance = wp_parse_args( (array)$instance, array(
                  'checkboxes' =&gt; array(
                      'Monday' =&gt; array('name' =&gt; 'Monday', 'value' =&gt; 'Monday', 'checked' =&gt; 1),
                      'Tuesday' =&gt; array('name' =&gt; 'Tuesday', 'value' =&gt; 'Tuesday', 'checked' =&gt; ''),
                      'Wednesday' =&gt; array('name' =&gt; 'Wednesday', 'value' =&gt; 'Wednesday', 'checked' =&gt; ''),
                      'Thursday' =&gt; array('name' =&gt; 'Thursday', 'value' =&gt; 'Thursday', 'checked' =&gt; ''),
                      'Friday' =&gt; array('name' =&gt; 'Friday', 'value' =&gt; 'Friday', 'checked' =&gt; ''),
                      'Saturday' =&gt; array('name' =&gt; 'Saturday', 'value' =&gt; 'Saturday', 'checked' =&gt; ''),
                      'Sunday' =&gt; array('name' =&gt; 'Sunday', 'value' =&gt; 'Sunday', 'checked' =&gt; '')
                  ),
                  'title' =&gt; 'Workdays'
              ));
  
          include( plugin_dir_path(__FILE__) . '/views/admin.php' );
      }
  
      function update( $new_instance, $old_instance ) {
          $instance = $old_instance;
          $instance['checkboxes'] = strip_tags($new_instance['checkboxes']);
  
          return $instance;
  
      }
  </code></pre>
  
  <p>This is the code for the view:</p>
  
  <pre><code>&lt;div class='ws-business-info'&gt;
  &lt;div class='form-group'&gt;
      &lt;?php foreach($instance['checkboxes'] as $day ) : ?&gt;
          &lt;div class='checkbox'&gt;
              &lt;label&gt;
                  &lt;input type="checkbox"
                         name="&lt;?php echo $day['name']; ?&gt;"
                        class="form-control"
                           id="&lt;?php echo $this-&gt;get_field_id($day['name']); ?&gt;"
                        value="&lt;?php echo $day['value']; ?&gt;"
                     &lt;?php checked('1', $day['checked']); ?&gt;/&gt;
                     &lt;?php echo $day['name']; ?&gt;
              &lt;/label&gt;
          &lt;/div&gt;
      &lt;?php endforeach; ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>The widget displays the checkboxes as expected but the state will not save. Dumping the $old_instance variable in the update function gives a null value. </p>