superslurpee
Programmer
- May 15, 2002
- 108
Hi,
I am storing constant names in my mysql db and need to use them as constants in my php code and not just get them as strings. These constants are page names and locations already defined by the time the code is read.
So for a quick example, I have a constant defined as 'FILENAME_COMPANY' and it holds the path to that page. In the database, I want to store 'FILENAME_COMPANY' so that when I pull it from the db, it is recognized as the constant already existing and not just as a string.
I have tried eval but it still doesn't seem to recognize it as the constant.
Any ideas?
Darth Slurpee
--At last we will reveal ourselves to the SEV employees--
I am storing constant names in my mysql db and need to use them as constants in my php code and not just get them as strings. These constants are page names and locations already defined by the time the code is read.
So for a quick example, I have a constant defined as 'FILENAME_COMPANY' and it holds the path to that page. In the database, I want to store 'FILENAME_COMPANY' so that when I pull it from the db, it is recognized as the constant already existing and not just as a string.
I have tried eval but it still doesn't seem to recognize it as the constant.
Any ideas?
Darth Slurpee
--At last we will reveal ourselves to the SEV employees--