File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,28 +51,35 @@ Subscribe someone to a list (with a `post` to the `list/{listID}/members` method
5151
5252``` php
5353$list_id = 'b1234346';
54+
5455$result = $MailChimp->post("lists/$list_id/members", [
5556 'email_address' => 'davy@example.com',
5657 'status' => 'subscribed',
5758 ]);
59+
5860print_r($result);
5961```
6062
6163Update a list member with more information (using ` patch ` to update):
6264
6365``` php
66+ $list_id = 'b1234346';
6467$subscriber_hash = $MailChimp->subscriberHash('davy@example.com');
68+
6569$result = $MailChimp->patch("lists/$list_id/members/$subscriber_hash", [
6670 'merge_fields' => ['FNAME'=>'Davy', 'LNAME'=>'Jones'],
6771 'interests' => ['2s3a384h' => true],
6872 ]);
73+
6974print_r($result);
7075```
7176
7277Remove a list member using the ` delete ` method:
7378
7479``` php
80+ $list_id = 'b1234346';
7581$subscriber_hash = $MailChimp->subscriberHash('davy@example.com');
82+
7683$MailChimp->delete("lists/$list_id/members/$subscriber_hash");
7784```
7885
You can’t perform that action at this time.
0 commit comments