Can PHP exclude the newline character when reading line by line?

前端 未结 5 647
时光说笑
时光说笑 2021-01-15 05:50

I want to read line by line but I do not want to deal with newline, I want it to be removed so I only end up with the content of the line.

So right now my function i

5条回答
  •  滥情空心
    2021-01-15 06:21

    Use trim() or rtrim()(if you want to preserve whitespaces in the beginning of the string) to strip whitespaces.

提交回复
热议问题