LMSouq
php-dev Open

PHP Constants Containing Arrays?

NI
Nick Heiner
1 month ago
3 views
Problem Description
This failed: define('DEFAULT_ROLES', array('guy', 'development team')); Apparently, constants can't hold arrays. What is the best way to get around this? define('DEFAULT_ROLES', 'guy|development team'); //... $default = explode('|', DEFAULT_ROLES); This seems like unnecessary effort.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base