on my localhost PHP7
is running and I am using define()
function to define an array. It's working fine.
define('JOBS_CREATORS', ['aaa@admin.com', 'bbbb@admin.com']);
As we know it works in PHP7
version. I googled and found const
keyword which works in PHP5.6
or lower version.
As I know the const
works only within the class
.
But I am using WordPress so I need to define in functions.php
file.
Is there any other way to define an array without using class
?