I need to be able to display the contents a text file in a PHP page, with each value from the text file a separate text box.
I have to use a text file as I do not have MySQL access with this hosting company.
Currently I have:
$filename = "data1.txt";
$fd = fopen($filename, "r") or
die("Cant open file");
$fstring = fread($fd, filesize($filename));
$lines = file("$filename");
foreach ($lines as $line)
if ($line)
{
$line = str_replace('"', '', $line);
//echo $line;
$fields = explode(",", $line);
$ref= $fields['0'];
$description= $fields['1'];
}
I believe this gives me an array with the values.
What I need to do is know how to display each value in a separate text box.
Can anyone help?
Thanks