アットウィキロゴ

fgetcsv2

<html>
    <head>
        <title>Example</title>
    </head>
    <body>
    <?php
$row = 1;
$handle = fopen("don.csv", "r");
$n = 1;
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
    $num = count($data);
    for ($c=0; $c < 3; $c++) {
$bdata[$n] = $data[$c];
$n = $n +1;      
}
}
fclose($handle);
for ($n=1; $n < 22; $n++) {
echo $bdata[$n]. "<br />\n";
}
?>
</body>
</html>
最終更新:2009年04月28日 07:59