Welcome to the Cookbook

loading...

7.4.1.11 tableHeaders

tableHeaders(array $names, array $trOptions = null, array $thOptions = null)

Creates a row of table header cells to be placed inside of <table> tags.

<?php echo $html->tableHeaders(array('Date','Title','Active'));?> //Output 
<tr><th>Date</th><th>Title</th><th>Active</th></tr>
 
<?php echo $html->tableHeaders(
    array('Date','Title','Active'),
    array('class' => 'status'),
    array('class' => 'product_table')
);?>
 
//Output
<tr class="status">
     <th class="product_table">Date</th>
     <th class="product_table">Title</th>
     <th class="product_table">Active</th>
</tr>
  1. <?php echo $html->tableHeaders(array('Date','Title','Active'));?> //Output
  2. <tr><th>Date</th><th>Title</th><th>Active</th></tr>
  3. <?php echo $html->tableHeaders(
  4. array('Date','Title','Active'),
  5. array('class' => 'status'),
  6. array('class' => 'product_table')
  7. );?>
  8. //Output
  9. <tr class="status">
  10. <th class="product_table">Date</th>
  11. <th class="product_table">Title</th>
  12. <th class="product_table">Active</th>
  13. </tr>