Version: 1
Type: Full Script
Category: Databases
License: GNU General Public License
Description: With this code u can display a CSV file in a table.
<?php print("<TABLE border="0" cellspacing"0" cellpadding="0" width=70% style="font-size: 10pt">n"); $row = 0; $handle = fopen("File.csv", "r"); while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); for ($c=0; $c <= $row; $c++) { print("<TR>"); print("<TD nowrap style="border-bottom: 1 solid #800000">".$data[0]." </td>"); print("<TD nowrap style="border-bottom: 1 solid #800000">".$data[1]." </td>"); print("<TD nowrap style="border-bottom: 1 solid #800000">".$data[2]." </td>"); print("<TD nowrap style="border-bottom: 1 solid #800000">".$data[3]." </td>"); print("</TR>"); } } fclose($handle); ?>