How to create multiple node at a same time programatically? I am creating a node via code 

   function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {   

        if($form_id=='article_node_form'){
            $form['#submit'][] = 'newApp';
        }
}   

functin newApp($form,$form_state){
        $node = new stdClass();
        $node-&gt;type = 'application';
        node_object_prepare($node);
        $node-&gt;title = $prductData-&gt;title;
        $node-&gt;language = LANGUAGE_NONE;
        node_save($node);
        }


It's creating the application node. I also alter content type node form for article. When I click save button of article content type it's creating my application type node, but it's not creating the article type node. I need the site to create one node create of article type and second application when I save a new article.
I guess it is because you overriding node variable. 

In my opinion the more Drupal way is to use Rules module. There you can create   application node after article is created.