Created
April 22, 2009 16:19
-
-
Save jcsalterego/99886 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foreach ($node->taxonomy as $item) { | |
| $parents = taxonomy_get_parents($item->tid); | |
| $parents_used = array(); | |
| foreach ($parents as $item2) { | |
| if ($item2->vid == 2 && !isset($parents_used[$item2->tid])) { | |
| $parents_used[$item2->tid] = true; | |
| } | |
| } | |
| var_dump(array_keys($parents_used)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment