I have a simple problem, but for some reason I can't figure it out!
I need to read in a string from a short text file, so I do that the normal way:
/*
// get string from the text file.
$filename = "textfilehere.text";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
*/ 

however, this text file contains variables, for example, the first could be:

Hello $variable_here

now when i print out the text file (it really needs to be emailed, but anyway) the 
variables are not parsed with the variables from the script, so instead of printing 
the contents of $variable_here within that string, it actually prints "$variable_here".
so, how can i parse a text file read into a string for variables??

any help is appreciated, and thank you very much in advance!

-derick

Reply via email to