Welcome Guest, Not a member yet? Register   Sign In
Config Class
#1

[eluser]Jamie Rumbelow[/eluser]
Does the config class return a useable array?

I've tried $this->config['file']['whatever'] but that doesnt work.

I want to run a foreach loop, like so...

Code:
foreach ($this->config['array'] as $key => $value){

etc...

}

Thanks,

Jamie
#2

[eluser]gtech[/eluser]
try running the below controller.. it shows you how the config object is built up. $this->config->config is an array.
Code:
<?php
class Temp extends Controller {

  function Temp()
  {
    parent::Controller();
  }
  function index()
  {
     echo "<pre>";
     print_r($this->config);
     echo "<br><br>";
     print_r($this->config->config);
     echo "</pre>";
  }
}
?&gt;
#3

[eluser]Jamie Rumbelow[/eluser]
Thanks a lot. Exactly what I needed. Cheers.




Theme © iAndrew 2016 - Forum software by © MyBB