I have data in phpmyadmin, example: (first row is header)
||from||to||messages||
||john||andy||meeting now||
||dony||sherly||Place in \"Jakarta\" , Indonesia, 15412
when I export to csv via phpmyadmin version 3.5.6, I get this csv file:
"from","to","messages"
"john","andy","meeting now"
"from","to","Place in \""Jakarta\"" , Indonesia, 15412"
if I use this code
<?php
// code start
$file = fopen($path, 'r');
while (($line = fgetcsv($file)) !== FALSE) {
print_r($line);
}
fclose($file);
// code end
?>
I hope get this
//output start
Array
(
[0] => from
[1] => to
[2] => messages
)
Array
(
[0] => john
[1] => andy
[2] => meeting now
)
Array
(
[0] => dony
[1] => sherly
[2] => Place in \"Jakarta\" , Indonesia, 15412
)
//output end
but instead I get
//output start
Array
(
[0] => from
[1] => to
[2] => messages
)
Array
(
[0] => john
[1] => andy
[2] => meeting now
)
Array
(
[0] => from
[1] => to
[2] => Place in \"Jakarta\""
[3] => Indonesia
[4] => 15412"
)
//output end
anyone can help this error?