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

前端 未结 5 677
时光说笑
时光说笑 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

    http://www.php.net/manual/en/function.file.php

    Look at the additional flags you can add to the function call. You should use "FILE_IGNORE_NEW_LINES"

提交回复
热议问题