<?php
$f1 = fopen("donnees_utilisateurs.txt", "r");
//while (fscanf($f1, "%s\t%s\t%s\n",$nom,$prof,$pays))
while ($nbval=fscanf($f1, "%s %s %s %d",$nom,$prof,$pays,$age))
{
    echo "----------------------------".PHP_EOL;
    echo "Nom        : ".$nom.PHP_EOL;
    echo "Profession : ".$prof.PHP_EOL;
    echo "Pays       : ".$pays.PHP_EOL;  
    echo "Age        : ".$age.PHP_EOL;  
    echo "Nombre de données lues = $nbval".PHP_EOL;
}
echo "----------------------------".PHP_EOL;
fclose($f1);
?>
