\n\n"; echo "\n"; echo "\n\n
\n"; //loop through the headers outputting them into their own "; $i++; } echo ""; $y = 1; //Output the data, looping through the number of lines of data and also looping through the number of cells in each line, as this is a dynamic number the header length has to be reread. while($y<$numlines){ $x=0; $i++; echo ""; while($x<$numheaders){ $fields = explode($sep, $lines[$y]); $fields = str_replace("\"", "", $fields); echo ""; $x++; } $y++; echo ""; } //close the table. echo "
cells while($i<$numheaders){ $headers = str_replace("\"", "", $headers); echo "".$headers[$i]."
".$fields[$x]."
\n\n"; ?>