CRM-15320-created foreach loop so that it processes the array of arrays ...

...rather than dropping the contact id