The fprintf() function writes a formatted string to a specified output stream (example: file or database). The arg1, arg2, ++ parameters will be inserted at percent (%) signs in the main string. This function works "step-by-step". At the first % sign, arg1 is inserted, at the second % sign, arg2 is inserted, etc.
int fprintf ( resource $handle , string $format [, mixed $args [, mixed $... ]] )
Write a string produced according to format to the stream resource specified by handle.
Parameter | Description |
---|---|
handle | A file system pointer resource that is typically created using fopen(). |
format | See sprintf() for a description of format. |
Returns the length of the string written.