Is there any way to call/compose a constant name in PHP, which does not require the use of eval?
I mean, I have several constant names following this schema:
define("CONSTANT_0", "foo 0");
define("CONSTANT_1", "foo 1");
define("CONSTANT_2", "foo 2");
and I want to be able to go through those values in a loop, something like this:
for ($i=0; $i<3; $i++)
echo CONSTANT_$i;
I can't use variables here because I'm using a pre-defined shared class, which already contains those values.
Thanks in advance