note 75438 added to function.fscanf
| From: | Bertrand dot Lecun at prism dot uvsq dot Fr | Date: | Wed, 30 May 2007 07:48:31 +0000 |
| Subject: | note 75438 added to function.fscanf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127012@lists.php.net to get a copy of this message | ||
It would be great to precise in the fscanf documentation
that one call to the function, reads a complete line.
and not just the number of values defined in the format.
If a text file contains 2 lines each containing 4 integer values,
reading the file with 8 fscanf($fd,"%d",$v) doesnt run !
You have to make 2
fscanf($fd,"%d %d %d %d",$v1,$v2,$v3,$v4);
Then 1 fscanf per line.
----
Server IP: 194.246.101.61
Probable Submitter: 195.83.48.35
----
Manual Page -- http://www.php.net/manual/en/function.fscanf.php
Edit -- https://master.php.net/note/edit/75438
Del: integrated -- https://master.php.net/note/delete/75438/integrated
Del: useless -- https://master.php.net/note/delete/75438/useless
Del: bad code -- https://master.php.net/note/delete/75438/bad+code
Del: spam -- https://master.php.net/note/delete/75438/spam
Del: non-english -- https://master.php.net/note/delete/75438/non-english
Del: in docs -- https://master.php.net/note/delete/75438/in+docs
Del: other reasons-- https://master.php.net/note/delete/75438
Reject -- https://master.php.net/note/reject/75438
Search -- https://master.php.net/manage/user-notes.php