0

I have array in my config and I get it to foreach. It works ok but how can I get parameter from any modules. For example I want parameter 1 to custom/custom/index.

Thank you for reply

$config['modules'] = array('calendar/calendar/index','randphoto/randphoto/index','feedback/feedback/index','survey/survey/index','custom/custom/index');

foreach ($this->config->item('modules') as $key) {
        echo Modules::run($key);
      }

If I try alone, it works fine but I want it in array echo Modules::run('custom/custom/index', 1);

1
  • use $this->uri->segment(3); This will give you the third parameter coming from url. For more read the user guide Commented Aug 2, 2012 at 15:03

1 Answer 1

1

use $this->uri->segment(3); This will give you the third parameter coming from URL. For more read the user guide

http://ellislab.com/codeigniter/user-guide/libraries/uri.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.