I would like to use fgetcsv()
function but in the PHP document it say I have to use fopen()
, popen()
, or fsockopen()
I would like fgetcsv()
to load from the string instead of file.
How can that be done?
For example:
//Get data from Curl
$curlData = "aaaa,111111,22222,33333
bbbbb,xxxx,dddddd,eeee
"
while($row = fgetcsv($curlData,"1000",",")) {
echo $row[0];
}