\n"; echo " NameSurname"; /* * Loop through the array of values returned by fgetcsv until there are * no more lines (indicated by FALSE) */ while ( ( $data = fgetcsv( $handle, $length, $delimiter ) ) !== FALSE ) { // Count number of array elements in $data $num = count($data); // Print opening table row HTML tag echo "\n"; echo "\n"; /* * Loop through the $data array and output each element * wrapped by opening and closing table data HTML tags */ for ($c=0; $c < $num; $c++) { echo "".$data[$c]."\n"; } echo "\n"; echo "\n"; // Print closing table row HTML tag echo "\n"; } // Print close table HTML tag echo ""; // Close the file pointed to by $handle fclose($handle); } } ?>