官方api: http://api.drupal.org/api/function/drupal_render
适用于drupal5,6,7
官方解释原文:
Renders HTML given a structured array tree.
Recursively iterates over each of the array elements, generatingHTML code. This function is usually called from within a anotherfunction, like drupal_get_form () or node_view ().
译文:
以一个结构数组树的形式递归成HTML.
反复递归每一层的数组元素,生成HTML代码。这个方法通常在另一个方法内被调用,比如drupal_get_form () 或者node_view ().
原理大致如此:
比如我写了一个form表单,里面有个叫name的文本框元素,如下
这时
其实我理解概括下来,就是你的诸多元素被drupal_render整合成html到$content中。