PHP: Count Lines of a File and Get the Number of Lines in a Text File
As we know, lines are separated from each other by line breaks indicated by “\n” in PHP, therefore, one method would be to explode() the entire file content string by “\n” into an array and then count() the number of the array items to come to the number of lines of that file. However, there’s …
PHP: Count Lines of a File and Get the Number of Lines in a Text File Read More »