I'm trying to figure out how to make a loop - which I've never done before, lol! I want to interpret a file, which I will have used a simple script to have written. I'm making a script for tracking "snail mail" addresses, and I'm logging entries to a flatfile db, and then I want to read the file and print a table.
I have 5 variables:
$lname //last name
$fname //first name
$maddr //mailing address
$phnum //phone number
I'm writing them to a text file, as such:
$f = fopen('list.txt','a');
fwrite($f, $lname . ' - ' . $fname . ' - ' . $maddr . ' - ' . $phnum . '*****');
fclose($f);
I want to create a loop which will extract the text file back into their origional variables. Any suggestions? I'm not quite sure on how to form a good loop for this. Any help would be greatly appriciated!