Skip to content

Commit 3ae2049

Browse files
committed
Fix syntax error for PHP 5.3
1 parent 5566613 commit 3ae2049

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/mailchimp_subscribe_email_address.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44

55
define('MAILCHIMP_API_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXX');
6-
define('MAILCHIMP_BASE_URL', 'https://' . explode('-', MAILCHIMP_API_KEY)['1'] . '.api.mailchimp.com/2.0/');
6+
$parts = explode('-', MAILCHIMP_API_KEY);
7+
define('MAILCHIMP_BASE_URL', 'https://' . $parts['1'] . '.api.mailchimp.com/2.0/');
78

89

910
$curl = new Curl();
@@ -29,7 +30,6 @@
2930

3031
if ($curl->error) {
3132
echo $curl->response->name . ': ' . $curl->response->error . "\n";
32-
}
33-
else {
33+
} else {
3434
echo 'Subscribed ' . $curl->response->email . '.' . "\n";
3535
}

0 commit comments

Comments
 (0)