title: Can't add user to a group using MailChimp API 3.0
body: <p>I'm trying to update my code for subscribing new users to my MailChimp newsletter.</p>
  
  <p>I would like it to add the user to a group, so that I can distinguish between users when sending out newsletters. This code, however, subscribes the user but does not add it to any group. What am I doing wrong? I am using the MailChimp API 3.0.</p>
  
  <p>My code:</p>
  
  <pre><code>$apiKey     = 'XXXX';
  $list_id    = 'XXXX';
  $memberId   = md5(strtolower($data['email']));
  $dataCenter = substr($apiKey,strpos($apiKey,'-')+1);
  
  $url = 'https://' . $dataCenter . '.api.mailchimp.com/3.0/lists/' . $list_id . '/members/' . $memberId;
  
  $json = json_encode(array(
      'email_address' =&gt; $data['email'],
      'status'        =&gt; $data['status'], // "subscribed","unsubscribed","cleaned","pending"
      'merge_fields'  =&gt; array(
          'FNAME'         =&gt; $data['firstname'],
          'LNAME'         =&gt; $data['lastname'],
          'GROUPINGS'     =&gt; array(
              0 =&gt; array(
                  'name'   =&gt; 'Interests',
                  'groups' =&gt; array( $data['tag'] ),
              ),
          ),
      ),
  ));
  
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_USERPWD, 'user:' . $apiKey);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_TIMEOUT, 10);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
  
  $result   = curl_exec($ch);
  $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  curl_close($ch);
  </code></pre>