I am developing a site wherein users can submit spreadsheets for retrieval and viewing online by other users. The following code works fine to parse an Excel spreadsheet in 'Text (Tab delimited)' format. Appleworks (Mac) spreadsheets saved to "ASCII text" are also tab delimited files but this code does not recognize the tabs or carriage returns from this type of Appleworks file. I know this question is partly an Apple/Mac issue but I've looked long and hard elsewhere for an answer and have found none and thought someone may have experience with this. Does anyone know what is going on?
$file = fopen("scorefiles/$resultarray[0]","r");
echo "<table border=\"1\">";
while (!feof($file)) {
$line = fgets($file, 5000);
$cell = explode("\t", $line);
$num = count ($cell);
echo "<tr>";
for ($c=0; $c<$num; $c++) {
echo "<td>$cell[$c]</td>";}
echo "</tr>";}
echo "</table>";