I converted a database to csv format and found out that some of the textfields have irregular line breaks. For example, the ideal format would be:
"Apple", "10", "There were ten apples in the orchard"
What some of the entries end up being are:
"Apple", "10", "There are ten
apples in the
orchard
"
Is there anyway with php that I can go through to fix these kind of irregular entries? I was hoping doing a fgetcsv would preserve the original columns, but I get a result like:
Array(
[0]=>"Apple"
[1]=>"10"
[2]=>"There are ten
)
Array(
[0]=>apples in the
)
Array(
[0]=>orchard
)
Array(
[0]=>"
)
"Apple", "10", "There were ten apples in the orchard"
What some of the entries end up being are:
"Apple", "10", "There are ten
apples in the
orchard
"
Is there anyway with php that I can go through to fix these kind of irregular entries? I was hoping doing a fgetcsv would preserve the original columns, but I get a result like:
Array(
[0]=>"Apple"
[1]=>"10"
[2]=>"There are ten
)
Array(
[0]=>apples in the
)
Array(
[0]=>orchard
)
Array(
[0]=>"
)