我正在制作一个 drupal 表并查找 drupal_theme() 并尝试遵循使用以下代码构建表的规则:
$data = array('value', 'values');
$header = array ($data);
$rows = array(
// Simple row
array(
'Cell 1', 'Cell 2', 'Cell 3'
),
// Row with attributes on the row and some of its cells.
array(
'data' => array('Cell 1', array('data' => 'Cell 2', 'colspan' => 2)),
'class' => 'funky'
)
);
//$output = theme('table', $header, $rows, $attributes = array(),
//$caption = NULL);
$table_t = theme_table($header, $rows, $attributes = array(), $caption = NULL);
//return $output;
return $table_t;
但是,该表不包含我预期的行和列标题。怎么了??
截屏: