function CampaignMonitor::clientGetListsDropdown in Campaign Monitor 5.2
Same name and namespace in other branches
- 6.3 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 968
Class
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;
}