This snippet shows how to get taxonomy vocabulary id (vid) by machine name of taxonomy vocabulary Drupal 7.
Source code viewer$vocabulary = taxonomy_vocabulary_machine_name_load('machiene_name');Programming Language: PHP