You need to define a constant containing an array but the code below doesn’t work ?
1 | define( 'FILTER_ECOLE' , array ( 'price, categorie, niveau' )); |
You get an error :
1 | Notice: Use of undefined constant FILTER_ECOLE - assumed 'FILTER_ECOLE' in /home/www/adin/app/code/local/Adin/Catalog/Block/Nav/Catalog/Layer/View/Sidebar.php on line 50 |
To define an use a constant containing an array you can simply serialize it :
1 2 3 4 5 | #define define( 'FILTER_ECOLE' , serialize( array ( 'price, categorie, niveau' ))); # use $filter = unserialize(FILTER_ECOLE); |