Array constant in PHP
A question asked privately:
Can I define an array constant in PHP?
No (see documentation), but there is a workaround you can use. You can serialize() an array and store the resulting string in a constant. When you need to use the array, unserialize() the constant.
This entry was posted in Answers
. Bookmark the permalink