Answers for "php get file content line by line"

PHP
1

php file read

<?php
  echo file_get_contents("text.txt");
?>
Posted by: Guest on November-17-2020
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 "php get file content line by line"

Browse Popular Code Answers by Language