Mega Code Archive

 
Categories / Php / File Directory
 

Fgetc() function returns one character from the file or returns false on reaching the end of file

Its syntax is: string fgetc (int filepointer) <? $fh = fopen("data.txt", "r"); while (! feof($fh)) :      $char = fgetc($fh);      print $char; endwhile; fclose($fh); ?>