דוגמה 1 . fscanf( ) Example
$fp = fopen ( "users.txt" ,"r") ; while ($userinfo = fscanf ($fp , "%s\t%s\t%s\n") ) { list ($name , $profession , $countrycode ) = $userinfo ; / /.. . do something with the values } fclose($fp) ;
דוגמה 2 . users.txt