Trent Wyman


Drupal - PHP Function to Check if Taxonomy Term Name Exists

Categories:

The following PHP function checks to see if a particular taxonomy id (term name) exists:

<?php
if(!empty($node->taxonomy) && $node->taxonomy[6]-->name == 'Term-name-here'){
print 'Term exists';
}else{
print 'Term does not exist';
}
?>


Announcements

DrupalCon Denver 2012 - I'm Going!

Press Release:
Michael C. Carlos Museum

Read the press release announcing the Drupal redesign of Emory University's Michael C. Carlos Museum. View Press Release