I am trying to read in a text file to an array using the following code,
however everytime I try and print the contents of the $table array, it
always says "ARRAY". Why won't it show me the actual contents of the file?
$row = 1;
$handle = fopen ("seclog.txt","r");
while ($data = fgetcsv ($handle, 1000, ",")) {
$num = count ($data);
print "<p> $num fields in line $row: <br>\n";
$row++;
for ($c=0; $c < $num; $c++) {
print $data[$c] . "<br>\n";
$table[] = $data;
}
}
fclose ($handle);
print $table;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php