If you want to span the column of custom drupal table like below image,
Follow the below code to make the header of the table ,
<?php
$header = array('S.N','District',
array('data' => '<div class ="house">Household </div><br><span>Rural</span> <p>Urban</p>','colspan' => 2),
array('data' => '<div class ="house">Members</div> <br><span>Rural</span> <p>Urban</p>','colspan' => 2),
'Duplicate/Failed Registration',
array('data' => '<div class ="house">Pending De duplication </div><br><span>Rural</span> <p>Urban</p>','colspan' => 2),
'Non Un-organised Workers',
'SSID Generated', 'No. of Card Personlised',
);
$rows[] = array(
'<b>'.$i.'</b>',
'Name',
'Delhi',
'1246472345431',
'Punjab',
'Test Rural',
'Test Data Manager',
'Developer Test',
'Yes',
'No',
'Follow data',
'Yes Manage',
);
$form['table'] = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
'#prefix' => '<div id="dash_tab">',
'#suffix' => '</div>',
'#empty' => t('No Data Found!')
);
return $form;
?>
//http://codeformatter.blogspot.in/2009/06/about-code-formatter.html
Is there any issue on it..
ReplyDelete