Credit to Mark Butler for answering this, so I've added his solution:
foreach($result->response as $entry) { echo $entry->ClientID; }
In general terms, getting at the contents of Campaign Monitor results requires you to access the response->Results part of the object returned from the method. Unfortunately, this is not clear from the API or documentation which tends to just 'print_var' the objects returned from the method calls.
For example, listing subscribers in a list:
require_once '/csrest_lists.php';
$sList = new CS_REST_Lists(YOUR_CM_LIST_ID,YOUR_CM_ACCT_KEY);
$sSubscribers = $sList->get_active_subscribers()->response->Results; // return results
foreach($sSubscribers as $s) {
echo $s->EmailAddress . "\t" . $s->Name . "\t" . $s->State . "\n";
}
Hope this is useful to people - thanks danyo for the question - there are few of these on SO at the moment. Pete