Template parser class and multilevel arrays |
[eluser]Unknown[/eluser]
Hi Everybody first of all i am new here, so hi. i am currently working on my first ci project, which will be a order management software. i am having some problems understanding how to access multilevel arrays with the template parser i have the following code: Code: ... i know it is not formatted or anything like that, now the array which i am passing look like this Code: [19] => Array as you can see country name is inside countries, how would i access it with the template parser? * i forgot to mention that all the other variables were showing correctly for each item of the array. only the country name doesn't show up
[eluser]bretticus[/eluser]
I have no idea if template parser is recursive, but you have tried something like? Code: {airports} I'm not sure I would use the CI parser class at all really. It's pretty limited if you need any layout logic (yes, good to avoid but not always possible.) I prefer good 'ole views (because I can use any PHP code I want.) However, if you anticipate you may need more control in your templates, you might want to use a template parser like Smarty.
[eluser]Unknown[/eluser]
Yes, gave me some errors.... i think i'll just rephrase the array to add another field of countryName in it. i just like the way it make the view file much cleaner Thanks |
Welcome Guest, Not a member yet? Register Sign In |