CI_URI::uri_to_assoc PHP Method

uri_to_assoc() public method

Generates an associative array of URI data starting at the supplied segment index. For example, if this is your URI: example.com/user/search/name/joe/location/UK/gender/male You can use this method to generate an array with this prototype: array ( name => joe location => UK gender => male )
public uri_to_assoc ( integer $n = 3, array $default = [] ) : array
$n integer Index (default: 3)
$default array Default values
return array
    public function uri_to_assoc($n = 3, $default = array())
    {
        return $this->_uri_to_assoc($n, $default, 'segment');
    }