[EMAIL PROTECTED] wrote:
I thought I could define() and array. However, when I do this:
define("THECONSTANT", array(1,2,3));
print_r(THECONSTANT);
it prints THECONSTANT and not the array :(
according to the manual:
bool define ( string $name, mixed $value [, bool $case_insensitive] )
And isn't "mixed" of any type?
No. The value of a constant must be a scalar, i.e. a string or a number.
So it is "mixed", but does not allow all types.
If you really want to you can serialise your array into the constant,
but that will incur a cost whenever you need to use it.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php