【发布时间】:2012-09-11 20:27:40
【问题描述】:
我有一个 drupal 模板,可以呈现如下内容:
<?php $field_collection_state_info = reset($content['field_state_information']['0']['entity']['field_collection_item']); ?>
<?php print render($field_collection_state_info['field_state_name']); ?>
但我想运行 php ucfirst(),所以所有呈现的内容都在第一个字母上大写。
我试过这个:
<?php print ucfirst(render($field_collection_state_info['field_state_name'])); ?>
但这没有用。
我应该如何做到这一点?
非常感谢任何建议。
C
【问题讨论】:
标签: php drupal drupal-7 drupal-render