Passing strings that contain variables to be parsed later
Posted: Tue Dec 07, 2004 9:36 am
I have a configuration file with the equivalent of the following:
sql_statement = "select * from $table a where a.x = '$x'"
I then read the sql_statement line from the configuration file in another php file where I would like $table and $x to be parsed. If I leave it like above, it tries to parse it immediately, not later when I need it. Does anyone have any idea on how the sql_statement line could be written so that it would be parsed in the file that reads it?
Thanks!!
sql_statement = "select * from $table a where a.x = '$x'"
I then read the sql_statement line from the configuration file in another php file where I would like $table and $x to be parsed. If I leave it like above, it tries to parse it immediately, not later when I need it. Does anyone have any idea on how the sql_statement line could be written so that it would be parsed in the file that reads it?
Thanks!!