I have a tab delimited txt file (ex. "US California LA") that needs to be output word for word. Could anyone help me figure out how to get it to break word for word??
My code:
while(($row = fgetcsv($file,"\t")) !== false)
{
print($row[0]);
}
Outputs:
Array
(
[0] => US California LA
)
From my reading the fgetcsv
should break each word after the delimiter, which it does do but only for COMMA separated entries looks like below.
Array
(
[0] => US
)