How to echo a value from an array using the Language class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to echo a value from an array using the Language class (/showthread.php?tid=58425) |
How to echo a value from an array using the Language class - El Forum - 06-11-2013 [eluser]thekrow[/eluser] The question might sound silly but if I have a multidimensional array in a language file, how can I load the content in my view? Say in my controller I have Code: class Statics extends CI_Controller { And then in my language file Code: $lang = array( How can I echo 'main'? I've tried the following to no avail. Thanks for your help. Code: <p><?php echo lang('description.main')?></p> Please note that my program was tested successfully if I have something like $lang['description.main'] = 'text here...'. For me it would be better to have all my data in an mutlidimensional array. How to echo a value from an array using the Language class - El Forum - 06-12-2013 [eluser]thekrow[/eluser] Anyone? please. How to echo a value from an array using the Language class - El Forum - 06-12-2013 [eluser]CroNiX[/eluser] Looking at the very short Lang.php code should quickly give you your answer on whether or not this class is set up for multidimensional arrays. |