Current Location: Home> Function Categories> fscanf

fscanf

Format input from a file
Name:fscanf
Category:File system
Programming Language:php
One-line Description:Parse the input according to the specified format.

Definition and usage

The fscanf() function parses the input from the opened file according to the specified format.

grammar

 fscanf ( file , format , mixed )
parameter describe
file Required. Specify documents to be inspected.
format Required. Specified format.
mixed Optional.

illustrate

fscanf() function is similar to sscanf() , but it accepts input from the file associated with the file and interprets the input according to the specified format . If only two parameters are passed to this function, the parsed value will be returned as an array. Otherwise, if optional parameters are provided, this function returns the number of assigned values. Optional parameters must be passed with reference.

Similar Functions
Popular Articles