How to add taxonomy terms programmatically in Drupal 7.
Source code viewer
'name' => 'term name', 'vid' => $vocabulary_id, 'vocabulary_machine_name' => 'vocabulary machine name' ); // in earlier Drupal versions use taxonomy_save_term taxonomy_term_save((object)$form_values);Programming Language: PHP