function CampaignMonitor::clientGetListsDropdown in Campaign Monitor 6.3
Same name and namespace in other branches
- 5.2 lib/CMBase.php \CampaignMonitor::clientGetListsDropdown()
- 6.2 lib/CMBase.php \CampaignMonitor::clientGetListsDropdown()
* Creates an associative array with list_id => List_label pairings. * *
Parameters
int $client_id (Optional) A valid Client ID to check against. If not given, the default class property is used.:
File
- lib/
CMBase.php, line 884
Class
- CampaignMonitor
- The new CampaignMonitor class that now extends from CMBase. This should be backwards compatible with the original (PHP5) version.
Code
function clientGetListsDropdown($client_id = null) {
$lists = $this
->clientGetLists($client_id);
if (!isset($lists['List'])) {
return null;
}
else {
$lists = $lists['List'];
}
$_lists = array();
if (isset($lists[0])) {
foreach ($lists as $list) {
$_lists[$list['ListID']] = $list['Name'];
}
}
else {
$_lists[$lists['ListID']] = $lists['Name'];
}
return $_lists;
}