title: How to pass parameters with space to controller from URL in codeigniter?
body: <p>I have one method in controller that receive several parameters:</p>
  
  <pre><code>public function api(){
    $url_params = $this-&gt;uri-&gt;segment_array();
  
     //...
  }
  </code></pre>
  
  <p>and this is example of URL:</p>
  
  <pre><code>http://testsite.com/services/api/invite-businesses/contact_name/_testing/message/some%20message/url/some_URL/
  </code></pre>
  
  <p>So my array seems like:</p>
  
  <pre><code>array(10) {
    [1]=&gt;
    string(8) "services"
    [2]=&gt;
    string(3) "api"
    [3]=&gt;
    string(17) "invite-businesses"
    [4]=&gt;
    string(12) "contact_name"
    [5]=&gt;
    string(12) "_testing"
    [6]=&gt;
    string(7) "message"
    [7]=&gt;
    string(14) "some%20message"
    [8]=&gt;
    string(3) "url"
    [9]=&gt;
    string(4) "some_URL"
  }
  </code></pre>
  
  <p>You can see that one of parameters has space: <code>some%20message</code>.</p>
  
  <p>But I want to get real value, a.e. <code>some message</code>. The value might contain any other character that URL converts to <code>%xx</code>.</p>
  
  <p>How to get real value   </p>