Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Define arrays in language file


Recommended Posts

This is a newbie one...


Is it possible to define an array in a language file, something like:


define ('ARRAY_VALUES', ' "value1, value2, value3, .... " ');

and use ARRAY_VALUES in a class ?




Link to comment
Share on other sites

Never mind ....

you can define the array in the language file like any other text:


define('MONTHS_ARRAY', 'Jan : Feb : Mar : Apr : ...... : Dec');


and then in the code you can use the array like:

$months = explode(" : " ,MONTHS_ARRAY);


at least this is what I came up with.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...