ARRAY

From: Date: Wed, 10 Dec 2003 18:26:22 +0000
Subject: ARRAY
Groups: php.general 
Request: Send a blank email to php-general+get-172369@lists.php.net to get a copy of this message
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;

« previous php.general (#172369) next »