formatting fgetcsv output
        Posted  
        
            by Patrick
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Patrick
        
        
        
        Published on 2009-07-30T18:24:48Z
        Indexed on 
            2010/04/27
            11:13 UTC
        
        
        Read the original article
        Hit count: 189
        
Im trying to figure out how to take the data returned by fgetcsv, and format it into a readable/editable table, and then use fputcsv to save that table
so far i have this
<?php
$row = 1;
$handle = fopen("csv.csv", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
    $num = count($data);
    $row++;
    for ($c=0; $c < $num; $c++) {
        echo $data[$c] . "\n";
    }
}
fclose($handle);
?>
        © Stack Overflow or respective owner