I'm building a site on the CodeIgniter framework and I'm using PHP switch to load the specific javascript relevant to the page. My issue comes when I get to the 3rd URI segment, which is generally a variable. for instance I have no issue with say 

```
case 'foo/bar':

```

but what if my url was something like <http://mysite.com/foo/bar/1234>, where the 1234 if a variable passed to the controller. It obviously wouldn't make sense to write out a case for every single variable because there's about 30k right now. 

currently here's a working snippet of my code... 

```
switch( $this->uri->uri_string() ) {

            case '': 

            break;

            case 'browse':

            break;

            case 'contest/leaderboard':

```