how to set up checkbox value while creating a node Here is my code. I have a problem with while creating node. There are three checkboxes which user have to select; only the last checkbox of data (black color) is saved for node. 

What is wrong with my code?

$node = new stdClass();
$node-&gt;type = 'product';
node_object_prepare($node);

$node-&gt;title    = $title;
$node-&gt;language = LANGUAGE_NONE;

$node-&gt;field_operator['und']['0']['tid'] = 135;// white color
$node-&gt;field_operator['und']['0']['tid'] = 136;// blue color
$node-&gt;field_operator['und']['0']['tid'] = 162;// black color

node_save($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;