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]};


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



Reply via email to