Jump to content

[SOLVED] Parsing out text file


AV1611

Recommended Posts

I can't seem to get rid of the return at in the last cell of this text... what I did with str_replace didn't fix it... how do I get rid of the EOL/LF whatever in the last cell???

[code]foreach ($lines as $line_num => $line) {
  if($line_num > 1){
        $data=explode(" ",$line);
        $aa=$data[0]." ".$data[1];
        $bb=$data[2];
        $cc=$data[3];
        $dd=$data[5];
        $ee=$data[6];
        $ee=str_replace("\n","",$ee);
[/code]
Link to comment
https://forums.phpfreaks.com/topic/32136-solved-parsing-out-text-file/
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.