Is It Possible to Declare Constant with Associative Array

Viewed 9588

I am trying to declare a constant for our office names of each country with associative array.

My declaring code is as below:

define( "OUR_OFFICE", [
    "Japan" => "Tokyo Shibuya Office",
    "Taiwan" => "Taipei Shilin Office",
    "Korea" => "Seoul Yongsan Office",
    "Singapore" => "Singapore Novena Office",
    "Australia" => "Sydney Darlinghurst Office"
]);

However, it just shows message:

Warning: Constants may only evaluate to scalar values

Is it possible to declare a constant with associative array?

Thank you very much!!!

2 Answers
Related