Re: insert *.TAB into table

From: Date: Tue, 01 Aug 2000 13:38:21 +0000
Subject: Re: insert *.TAB into table
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-9432@lists.php.net to get a copy of this message
Vadee Prudon wrote: > > Hai, > > I'm using an *.tab file and importing like ; > > $fp = fopen ("$userfile","r"); > while ($data = fgetcsv($fp, 10000, " ")){ > > $num = count($data); > $row++; > echo "<TR>"; > for ($c=0; $c<$num; $c++){ > echo "<TD>$data[$c]</TD>"; > } > echo "</TR>"; From php page comments: "fgetcsv() seems to ignore zero-length fields when working with tabs as separators (3.0.12). Instead work around this with fgets() and do an explode() afterwards, this gets you the right thing." -- pozdrawiam.. ## ## | Sylwester Zarębski - ISP Group | #### ## | e-mail: sylwek@isp.net.pl | ## ## ## | ICQ uin: #45780888 | ## #### ## | Administrator ISP.NET.PL |

« previous php.general (#9432) next »