public function findInstrumentsBySection(Api_Controller $controller) { $section = $controller->params['section']; if (!isset($section)) { $controller->setError(array("status" => 400, "dev" => "No section supplied", "user" => "No section supplied")); return; } foreach ($this->instruments as $instrument) { $sec = ',' . $section . ','; $insec = ',' . $instrument['section'] . ','; if (strpos(',' . strtolower($section) . ',', ',' . strtolower($instrument['section']) . ',') !== FALSE) { $controller->output[] = $instrument; } } }