Answers for "read first line of txt php"

PHP
14

php get first character of string

$firstStringCharacter = substr("hello", 0, 1);
Posted by: Guest on October-19-2019
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

Browse Popular Code Answers by Language