Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to set optional third parameter in routes of codeigniter

$routes->get('logout/(:any)', 'Login::logout/$1');
$routes->get('logout', 'Login::logout'); 

public function logout($param1 = null, $param2 = null, $param3 = null)
{
    var_dump($param1, $param2, $param3); exit;
}
 
PREVIOUS NEXT
Tagged: #set #optional #parameter #routes #codeigniter
ADD COMMENT
Topic
Name
9+2 =