Re: define() an array?
| From: | Jeremy Privett | Date: | Fri, 20 Apr 2007 08:59:30 +0000 |
| Subject: | Re: define() an array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253326@lists.php.net to get a copy of this message | ||
lists@dwsasia.com 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@completelyunique.com 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.