Why isn't ['field_name'][0]['#markup'] work for getting taxonomy of this node? I have two content types: Case and News.
In node--case.tpl.php, I'm using echo $content['field_case_category'][0]['#markup']; in order to print the taxonomy term for the page and that works fine. In node--news.tpl.php, I can't use echo $content['field_news_category'][0]['#markup'];; in fact, #markup is not even present in this array at all.


Why doesn't this method work in the second case? What can I do to solve it?
Is there a better/right way to print taxonomy terms in nodes?


The error I get is the following:


  Notice: Undefined index: #markup in include()
Please don't print some result directly. You should print the content of field like below.

print drupal_render($content['field_case_category']);


Hope this solves your problem. Also please check whether your node contains the value for the field_case_category field.