Node create progrmatically with multiselect I am creating a node progrmatically. 

here is my code.. 

     $node = new stdClass();
      $node-&gt;type=$type;
      $node-&gt;status = 1;
      $node-&gt;uid = $uid;

        foreach($_POST as $field_name=&gt;$field_value) {
          $node-&gt;$field_name=array('und'=&gt;array(0=&gt;array('value'=&gt;$field_value)));

        }
node_save($node);


this is working fine. if we have a single value for each field.. Now i have a filed having select box with multiple select. How to save them. 

Thanks
You just need to keep adding new values underneath the language array, for example:

foreach ($_POST as $field_name =&gt; $field_value) {
  $node-&gt;{$field_name}[LANGUAGE_NONE][]['value'] = $field_value;
}