Answers for "fgetc in php"

PHP
1

fgetc in php

//syntax: Fgetc(fileName) 

//It will read file character by character 

//By default it will read only one character at a time. 

//If we put this in while loop then read whole file. 

//Ex: 

    echo fgetc($fptr);  //by default only one character will print 

 

  while($line = fgetc($fptr)) 

    { 

        echo $line;	//read whole file 

    }
Posted by: Guest on October-12-2021

Browse Popular Code Answers by Language