close

$this->uri->assoc_to_uri()

建立一個關連式陣列來作為輸端並且產生 URI 字串的格式

$array = array('product' => 'shoes', 'size' => 'large', 'color' => 'red');

$str = $this->uri->assoc_to_uri($array);

// Produces: product/shoes/size/large/color/red

 

$this->uri->uri_to_assoc(n)
這個函數讓你將 URI 區段轉換成關聯式陣列,範例如下:


index.php/user/search/name/joe/location/UK/gender/male
使用這個函數可以讓你將 URI 轉換成如下方的關聯式陣列:

[array]
(
'name' => 'joe'
'location' => 'UK'
'gender' => 'male'
)

arrow
arrow
    全站熱搜

    stockwfj3 發表在 痞客邦 留言(0) 人氣()