About the fgetcsv function fgetcsv (resource & nbsp; fp, int & nbsp; length & nbsp; [, & nbsp; string & nbsp; delimiter & nbsp;, string & nbsp; enclosure, escape]) please explain the red part. Write an example. What is Green? about the fgetcsv function
Fgetcsv (resource fp, int length [, string delimiter, string enclosure, escape])
Please explain the red part. Write an example.
What is green?
Share: More
------ Solution --------------------
$ S = <TXT
Aaa, bbb, ccc
"Aaa", "bbb", "ccc"
'AAA'
------ Solution --------------------
'BBB'
------ Solution --------------------
'CCC'
TXT;
File_put_contents('csv_test.txt ', $ s );
$ Fp = fopen('csv_test.txt ', 'r ');
Print_r (fgetcsv ($ fp ));
Print_r (fgetcsv ($ fp ));
Print_r (fgetcsv ($ fp ,"
------ Solution --------------------
","'"));
Array
(
[0] => aaa
[1] => bbb
[2] => ccc
)
Array
(
[0] => aaa
[1] => bbb
[2] => ccc
)
Array
(
[0] =>
[1] => aaa
[2] =>
------ Solution --------------------
[3] => bbb
[4] =>
------ Solution --------------------
[5] => ccc
[6] =>
)