Skip to content

Commit 58e7bf0

Browse files
committed
Change response lists function to list[id] = name
1 parent 20d0871 commit 58e7bf0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ActivecampaignManager.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ public function lists()
130130

131131
$xml = (array)simplexml_load_string($response, "SimpleXMLElement", LIBXML_NOCDATA);
132132

133-
return empty($xml) ? "FAILED" : $xml['row'];
134-
}
133+
$lists = [];
134+
foreach ($xml['row'] as $item){
135+
$lists[$item->id->__toString()] = $item->name->__toString();
136+
}
137+
138+
return empty($xml) ? "FAILED" : $lists; }
135139
}

0 commit comments

Comments
 (0)