php - drupal 6 table theme() output -
i making drupal table , looked drupal_theme() , tried follow rules constructing table next code:
$data = array('value', 'values'); $header = array ($data); $rows = array( // simple row array( 'cell 1', 'cell 2', 'cell 3' ), // row attributes on row , of 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; homecoming $table_t;
however, table doesn't contain row , column headers expected. whats wrong??
screenshot:
i'm not sure if help, code table headers utilize in 1 of modules.
$header = array( array('data' => t('one')), array('data' => t('two')), array('data' => t('three')), array('data' => t('four')), );
see if works you.
also, theme_table($header, $rows, $attributes = array(), $caption = null)
can theme_table($header, $rows)
php drupal drupal-6
No comments:
Post a Comment