
What was this perfect use case? In WordPress you can get all of the terms for a taxonomy via get_terms(). One of the arguments you can pass is the returned format of ‘id=>name’. I need to flip that to ‘name=>id’ for an import I’m doing.
array_flip() to the rescue!