Read text file with format
<?php
$fh = fopen("intData.txt", "r");
/* Parse each SSN in accordance with integer-integer-integer format. */
while ($user = fscanf($fh, "%d-%d-%d")) {
list ($part1,$part2,$part3) = $user;
echo "Social Security: $part1-$part2-$part3 <br />";
}
fclose($fh);
?>
<!-- intData.txt
1-3-4
-->
Related examples in the same category