Show row number
This commit is contained in:
@@ -18,16 +18,16 @@ header('Content-Disposition: attachment; filename="go-form-' . sanitize_title($f
|
||||
$output = fopen('php://output', 'w');
|
||||
|
||||
// Build header row
|
||||
$header = ['ID', 'First Name', 'Last Name', 'Country', 'Club', 'Rank', 'Rating', 'EGD Number', 'Date Added'];
|
||||
$header = ['N', 'First Name', 'Last Name', 'Country', 'Club', 'Rank', 'Rating', 'EGD Number', 'Date Added'];
|
||||
foreach ($custom_fields as $field) {
|
||||
$header[] = $field->field_name;
|
||||
}
|
||||
fputcsv($output, $header);
|
||||
|
||||
foreach ($entries as $e) {
|
||||
foreach ($entries as $i => $e) {
|
||||
global $ranks;
|
||||
$row = [
|
||||
$e->id,
|
||||
$i,
|
||||
$e->first_name,
|
||||
$e->last_name,
|
||||
$e->country,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<table class="wp-list-table widefat striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Country</th>
|
||||
@@ -24,9 +25,10 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach ($entries as $e): ?>
|
||||
<?php foreach ($entries as $i => $e): ?>
|
||||
|
||||
<tr>
|
||||
<td> <?= $i + 1 ?> </td>
|
||||
<td> <?= esc_html($e->first_name) ?> </td>
|
||||
<td> <?= esc_html($e->last_name) ?> </td>
|
||||
<td> <?= esc_html($e->country) ?> </td>
|
||||
|
||||
Reference in New Issue
Block a user