title: codeigniter blank URI segment
body: <p>i have the following URI:</p>
  
  <pre><code>    http://mysite/myapp/index.php/test/testURL/CAN-q1/300-48/fa1/59//can-a2
  </code></pre>
  
  <p>You'll notice that the 7th URI segment is not set. 
  I need to test for these types of scenarios.<br>
  I've tried a few different things but i can't seem to get it to work.  What's happening is segment 8 is being assigned as segment 7.
  Here's some test code I've been playing with this morning: </p>
  
  <pre><code>    echo '3 - '. $this-&gt;uri-&gt;segment(3); 
      echo '&lt;BR&gt;';
      echo '4 - '. $this-&gt;uri-&gt;segment(4); 
      echo '5 - '. $this-&gt;uri-&gt;segment(5); 
      echo '&lt;BR&gt;';
      echo '6 - '.$this-&gt;uri-&gt;segment(6);
      echo '&lt;BR&gt;';
      $test = $this-&gt;uri-&gt;segment(7,0);   
      echo '7 is: '.$test;
      echo '&lt;BR&gt;';
      echo '8 - '. $this-&gt;uri-&gt;segment(8);
      echo '&lt;BR&gt;';
  </code></pre>
  
  <p>And the results come back as: </p>
  
  <pre><code> 3 - CAN-q1
   4 - 300-48
   5 - fa1
   6 - 59
   7 is: can-a2
   8 - 
  </code></pre>
  
  <p>Based on reading the codeigniter manual, i would have expected that segment 7 would contain a 0 or whatever i passed as the second parameter in the uri->segment() method. </p>
  
  <p>Can you tell me where I'm going wrong?
  Thanks. </p>