Add multiple record with checkbox

Hi,
I tried with code from https://discourse.hkvstore.com/t/iterate-dropdown-checkbox-selected-value-to-insert-records/536/1 the explode code is not working cause my field is integer
$field2array = explode(‘,’, $rsnew[‘field2’]);Ex if I select ID 2 and 4, it’s inserted as 24Any idea ?