Setting Values

You can set the tags field type value with an array of selected options:

$entry->example = ["foo", "bar"];