Re: hard(?) syntax problem
| From: | pete M | Date: | Tue, 04 Nov 2003 16:27:46 +0000 |
| Subject: | Re: hard(?) syntax problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168481@lists.php.net to get a copy of this message | ||
unfortunately Constants are scalar only, arrays not allowed
below is from the manual
-------------------------------------------
Constants do not have a dollar sign ($) before them;
Constants may only be defined using the define() function, not by simple assignment;
Constants may be defined and accessed anywhere without regard to variable scoping rules;
Constants may not be redefined or undefined once they have been set; and
Constants may only evaluate to scalar values.
pete
Adam I Agnieszka Gasiorowski Fnord wrote:
I want to access a value of an array by key, but the array is not a variable - it is a constant. How do I do it? I tried $value = PL_ORT[$key]; , but this doesn't work (parse error)... I even tried $value = {PL_ORT[$key]};