Re: define() an array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lists@xxxxxxxxxxx wrote:
Hi,

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?

/Peter

--PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



.

In this case, "mixed" means any scalar value. And "mixed" usually applies when a variable can be of more than one type, not necessarily all.

--
Jeremy C. Privett
Director of Product Development
Zend Certified Engineer
Completely Unique
jprivett@xxxxxxxxxxxxxxxxxxxx

Phone:     303.459.4819
Mobile:    303.883.0312
Fax:       303.459.4821
Web:       www.completelyunique.com

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. Your compliance is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux