I am trying to fetch a specific column from a file by using PHP. but so far I got all of it, have no idea how to do this, I can not find any information online so if anyone could help me about this , I will be very appreciated. The data in file is like blow:
20110101,1110.0
20110102,1100.0
20110103,50.0
20110104,6355.0
........
I just want to fetch the second column, here is my PHP code:
$file_handle = fopen("file_name", "r");
while (!feof($file_handle)) {
$line = fgets($file_handle);
echo $line."<br/>";
}
fclose($file_handle);