I decided to post a more thorough answer, as I worked with file functions like these for months before I started using MySQL. This example assumes you're storing data to a file in the following format:
Some text here||more here||first line
here is a new line||variable 2||3 etc
blah||blah||blah
This allows you to store user info w/out using a database.
// Reads entire file into an array
// One line of file = one array item
$arrFileData = file("file_name.txt");
// Split the line into variables
for ($i = 0; $i < count($arrFileData); $i++) {
// create temp var & trim \n
$temp = trim($arrFileData[$i]);
$arrLineData = split("||", $temp);
// now, var 1 = $arrLineData[0]
// var 2 = $arrLineData[1], etc
}