Jump to content

removing double quotation marks


sasori

Recommended Posts

hello, i have this text file attached, and I am currently extracting the data from it.

and yeah, I know how..but the problem is the double quotation marks.

the last double quotation mark doesn't go away,,,am also aware that trim()

only accepts strings. but how come, it does remove  the first double quotation mark

and leave the 2nd one.

here's my script, feel free to download the file and try my script in your own localhost

and tell me what's wrong . Thanks in advance


$fh = fopen('iso3166.txt','r');
while(!feof($fh))
{
  $lines = fgets($fh);
  $parts = explode(",",$lines);
  print trim($parts[1],'"')."<br />";

}
fclose($fh);

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/215872-removing-double-quotation-marks/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.