CI_URI::assoc_to_uri()

assoc_to_uri($array)

Parameters:
  • $array (array) – Input array of key/value pairs
Returns:

URI string

Return type:

string

Takes an associative array as input and generates a URI string from it. The array keys will be included in the string. Example:

1
2
3
4
$array = array('product' => 'shoes', 'size' => 'large', 'color' => 'red');
$str = $this->uri->assoc_to_uri($array);
 
// Produces: product/shoes/size/large/color/red
doc_CodeIgniter
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.