pass parameter from controller to view
I am passing
$router->map('Owner', 'Owner/:is_owner','null', a开发者_StackOverflow中文版rray('controller' => 'companies', 'action' => 'index','is_owner'=>'1'));
$router->map('Client', 'Client/:is_owner','null', array('controller' => 'companies', 'action' => 'index','is_owner'=>'0'));
in controller I'm getting it by,
$flag=$_GET['is_owner'];
in view I want to access $flag...how to do that?
Using smarty you could do it as:
//In controller $smarty->assign('flag', $flag); //In view {$flag}
精彩评论