PHP fgetc() Function

PHP fgetc Function


Definition :

In this tutotrial we are going to be studying about the PHP fgetc() Function.The built-in PHP fgetc() function returns a single character from an open file and gets a character from a given file pointer.

Syntax

   fgetc(file)

Parameter
Parameter Description
file Required. Specifies the open file to return a single character from

Given below example Read one character from the open file:(In demo.txt file Hello World already written)

Output : H