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); 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 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! 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
Archived
This topic is now archived and is closed to further replies.