This is my action URL of which I'd like to get the 16.
http://localhost/carsdirectory/Galleries/add/16
Please help me.
$this->params['pass']
Returns an array (numerically indexed) of URL parameters after the Action.
// URL: /posts/view/12/print/narrow
Array
(
[0] => 12
[1] => print
[2] => narrow
)
Another Method is - Just pass the parameter to the function itself like as follows:
function add($id=null)
{
echo $id;
}
this will return your id