feature;
$options = array('return_array' => 1);
$feature = chado_expand_var($feature, 'table', 'analysisfeature', $options);
$analyses = $feature->analysisfeature;
// don't show this page if there are no analyses
if (count($analyses) > 0) { ?>
  
This type_id->name ?> is derived from or has results from the following analyses
 analysis_id->name;
    if (property_exists($analysis->analysis_id, 'nid')) {
      $analysis_name = l($analysis_name, "node/" . $analysis->analysis_id->nid);
    } 
    $rows[] = array(
      $analysis_name,
      preg_replace('/\d\d:\d\d:\d\d/', '',  $analysis->analysis_id->timeexecuted),
    );
  }
   
  // the $table array contains the headers and rows array as well as other
  // options for controlling the display of the table.  Additional
  // documentation can be found here:
  // https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7
  $table = array(
    'header' => $headers,
    'rows' => $rows,
    'attributes' => array(
      'id' => 'tripal_feature-table-analyses',
      'class' => 'tripal-data-table'
    ),
    'sticky' => FALSE,
    'caption' => '',
    'colgroups' => array(),
    'empty' => '',
  );
  
  // once we have our table array structure defined, we call Drupal's theme_table()
  // function to generate the table.
  print theme_table($table);  
}