I am using version 3 of php, does anyone know how to read data (variable) stored in a text file and display the data on a web page using arrays? Thanx!
$myArray = file("$file_name");
foreach ($myArray as $line) { echo "$line<br>"; }
Will this work in this case: A user enters information in a form, ex name date Description Each item is stored in a vaiable then written to the text file. THe webpage reads this files and displays the information from each vaiable. there can be many records in t the text file but there not store by record but each variable needs to be pulled out and displayed separate, not a one string. Does this make sense? I had it working for version for but in version 3 the arrays don't seem to be functioning correctly.
for that you'd want to write an ini file for each user.
....file.ini... ex_name=Barney date=04/16/2002 Description=blah ;;a comment here
$fileArr = parse_ini_file('file.ini'); print_r($fileArr);
thanks, I'll try this!