Add titles to Table Headers

Each column is assigned with a header title.

To assign titles to each column header use the $td_titles array and simply add a Title, it is important to note that the same number table headers must be exactly the same as the number of table columns used with $td_fields

 

$td_titles = array("
NAME,
LAST NAME,
DOB,
EMAIL,
TELEPHONE
");

or 

 

$td_titles = array();
array_push($td_titles,"NAME");
array_push($td_titles,"LAST NAME");
array_push($td_titles,"DOB");
array_push($td_titles,"EMAIL");
array_push($td_titles,"TELEPHONE");

 

We can add more properties like Title, Sort and Width by passing an array on each $td_titles value

 

$th = array(
'name'=> 'ES',
'title'=> 'Email Sent', //hover title attribute (optional)
'width'=> 20, //(optional)
'sort'=>'EMAIL_STATUS' //(optional)
);

array_push($td_titles,$th);

 

or short version:

 

array_push($td_titles,array('name'=> 'ES','title'=> 'Email Sent','width'=> 20,'sort'=>'EMAIL_STATUS'));

 

Or it can be done in a string manner (title attribute not available), for more in this syntax see the next posts.

 

array_push($td_titles,'80-REGISTRATION DATE:sort:reg_date'); 

/*
width = 80px
Name / Ttitle = REGISTRATION DATE
SORT BY: reg_date
*/
Get a Quote

Get a Quote