how to set up checkbox value while creating a node
Supposing the field can accept multiple values, the code should be similar to the following one.

    $node-&gt;field_operator['und'][0]['tid'] = 135;
    $node-&gt;field_operator['und'][1]['tid'] = 136;
    $node-&gt;field_operator['und'][2]['tid'] = 162;