I'm creating a module for a website, and to get the module parameters I do something like this:
//-- Get a parameter from the module's configuration $company1_enable = $params->get('company1_enable'); $company1_name = $params->get('company1_name'); $company1_logo = $params->get('company1_logo'); $company1_image = $params->get('company1_image'); $company1_description = $params->get('company1_description');
But this module must support ~40 companies, meaning I would have to repeat this code 40 times, only changing the number after "company" (
$company2_enable = $params->get('company2_enable');,
$company3_enable = $params->get('company3_enable'); etc. )
Is there any way to use a loop on the
$params object in order to do this more effectively?