For doing updates to multiple contacts using the API, is there a better way than this?
$res = civicrm_api3('Contact', 'get', $params);
foreach ($res['values'] as $contact) {
civicrm_api3('Contact', 'create', array('id' => $contact['id'], ... ))
}
For a large number of contacts, this is slow and eventually runs out of memory.