The fscanf() function parses the input from an open file according to the specified format.
mixed fscanf ( resource $handle , string $format [, mixed &$... ] )
The function fscanf() is similar to sscanf(), but it takes its input from a file associated with handle and interprets the input according to the specified format, which is described in the documentation for sprintf().
Any whitespace in the format string matches any whitespace in the input stream. This means that even a tab \t in the format string can match a single space character in the input stream. Each call to fscanf() reads one line from the file.
javier argonaut pe hiroshi sculptor jp robert slacker us luigi florist it
Parameter | Description |
---|---|
file | Required. Specifies the file to check |
format | Required. Specifies the format. |
Possible format values : - | |
Additional format values. These are placed between the % and the letter (example %.2f) : - | |