Answers for "how to read txt file line by line in php"

PHP
1

read line by line php

<?php
	
	$file = new SplFileObject("file.txt");

	while(!$file->eof())
	  {
		echo $file->fgets()."<br/>";
	  }

	$file = null;

?>
Posted by: Guest on December-25-2020

Code answers related to "how to read txt file line by line in php"

Browse Popular Code Answers by Language