$data = array('user_id' => $userID, 'groups' => maybe_serialize($groups));
$wpdb->insert('table', $data);
To get it back into an array, use
'maybe_unserialize()'
$data = array('user_id' => $userID, 'groups' => maybe_serialize($groups));
$wpdb->insert('table', $data);
'maybe_unserialize()'
Comments