How can I get in ZF2 the current (selected) module name in the application layout? Purpose: My application layout include the main menu of the zf2 app, and every time a modu
Use array_shift instead of array_pop (Kunal Dethe answer):
$controller = $this->getParam('controller'); $module_array = explode('\\', $controller); $module = array_shift($module_array);