Let me try to make this more understandable:
Lets call a file "game.txt" - This text file contains 1 variable...
game=1
My php script needs to load the file, and read that the variable 'game' equals '1'. Now my script can use "$game" to spit out '1' wherever I want. The only dificulty that I am having is figuring out how to get php to understand that this is a variable and not plain text. This is how it has to be. I cannot use any other way. It must be able to read data from the text file.
If I need to make this any more simple, so that you understand, let me know...
Not sure, but I think this would work.
You may need to put this in a loop, and probably use the readdir() function if you want to read ALL the files... but this is the skin and bones:
$fp = fopen("FILENAMEHERE.txt", "r");
$file_contents = fread($fp, filesize("FILENAMEHERE.txt"));
fclose($fp);
$somearray = explode("=", $file_contents);
// So $somearray[0] is now the variable name
// and $somearray[1] is the variable result
// but you want the variable name to be what it was...
$$var = $somearray[0];
// Debug:
// echo $game ."<br>";
// echo $somearray[0] ."<br>";
// echo $somearray[1] ."<br>";
Again, not sure if that works but it's worth a shot.
.eregi