Lamez Posted November 21, 2010 Share Posted November 21, 2010 How come I cannot do this? define('IMG_EXT', array("jpg", "jpeg", "png", "gif", "bmp", "tif"), true); Quote Link to comment https://forums.phpfreaks.com/topic/219348-define-an-array-as-an-constant/ Share on other sites More sharing options...
mikecampbell Posted November 21, 2010 Share Posted November 21, 2010 Because PHP constants must be scalars. See this http://www.php.net/manual/en/function.define.php#89455 Quote Link to comment https://forums.phpfreaks.com/topic/219348-define-an-array-as-an-constant/#findComment-1137391 Share on other sites More sharing options...
Lamez Posted November 21, 2010 Author Share Posted November 21, 2010 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/219348-define-an-array-as-an-constant/#findComment-1137470 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.