Welcome Guest, Not a member yet? Register   Sign In
URI class, working with uri string
#1

[eluser]Unknown[/eluser]
I have some code in my controller class:

Code:
public function mymethod()
{
    $default = array('page', 'city', 'code');
    $get = $this->uri->ruri_to_assoc(3, $default);
        
    print_r($get);

    echo $this->uri->assoc_to_uri(
        array(
            'city' => 1,
            'code' => NULL,
            'page' => 1)
        );
    exit;
}

When open "http://local-domain/mymethod/city/1/code//page/1, I have:

Code:
Array
(
    [city] => 1
    [code] => page
    [1] =>
    [page] =>
)
city/1/code//page/1

Why [ code] = page ?
I expected [ code] = '' or [ code] = NULL

codeigniter version 2.0.2




Theme © iAndrew 2016 - Forum software by © MyBB