-
Notifications
You must be signed in to change notification settings - Fork 0
/
new.data.show.php
41 lines (34 loc) · 985 Bytes
/
new.data.show.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<pre>
<?php
# include parseCSV class.
require_once('lib-parsecsv/parsecsv.lib.php');
# create new parseCSV object.
$csv = new parseCSV();
# Parse '_sabc.csv' using automatic delimiter detection...
$csv->auto('example-data/_sabc-new.csv');
# include UKtneUtils class.
require_once('uktne-utils.lib.php');
# create new UKtneUtils object.
# Parse data and reformat...
$csvnew = new UKtneUtils($csv->titles, $csv->data);
?>
</pre>
<style type="text/css" media="screen">
table { background-color: #BBB; }
th { background-color: #EEE; font-size: 80%; }
td { background-color: #FFF; font-size: 75%; }
</style>
<table border="0" cellspacing="1" cellpadding="3">
<tr>
<?php foreach ($csvnew->titlesnew as $value): ?>
<th><?php echo $value; ?></th>
<?php endforeach; ?>
</tr>
<?php foreach ($csvnew->datanew as $key => $row): ?>
<tr>
<?php foreach ($row as $value): ?>
<td><?php echo $value; ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</table>