To query a flat file db you need to use the file() function to get the number of rows (lines) e.g...
$get_lines = file('textfile_Db.txt');
get number of rows...
$number_of_lines = count($get_lines);
To get the fields (columns) you will need to explode("delimeter", eachLine) the delimeter and bounderies. e.g if fields are seperated like so...
field one','field two','field three',' etc etc....
then use a for loop to display them...
for($i=($number_of_lines-1); 0 <= $i; $i--) { $line[] = $get_lines[$i]; }
for($i = 0; $i < $number_of_lines; $i++){
$line_array = explode("','",$line[$i]);
$line_array[0] = stripslashes($line_array[0]);
$line_array[1] = stripslashes($line_array[1]);
$line_array[2] = stripslashes($line_array[2]);
etc.....
So in short you use file() to get the number of rows,
Use explode() to break each line at the delimeter,
The use stripslashes() any other suitable functions and html embedding to diplay the results the way you like.
I hope this makes sense.
Steve Obbayi.