I was trying to fetch the data from csv to display using php.Here is the code
<?PHP
$file_handle = fopen("dept.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);
?>
I am getting the output but getting a notice msg :
Notice: Undefined offset: 2
How to solve it?