Read a CSV in PHP line by line and access each field

<?PHP
 
$file_handle = fopen("widgets.csv", "r");
 
while (!feof($file_handle) ) {
 
$line_of_text = fgetcsv($file_handle, 1024);
 
print $line_of_text[0] . $line_of_text[1]. $line_of_text[2] . "<BR>";
 
}
 
fclose($file_handle);
 
?>

Of course, you would increase the index of $line_of_text[i] if you had more than 3 columns.