Strip "/" from the beginning and the end of my URI
<p>So I have a URI that is returned like so /intelliship/ I need the beginning slash and trailing slash to be removed from that URI.</p>

<p>Attempted (FAILED) code:</p>

<pre><code>&lt;?php 
$value = $_SERVER['REQUEST_URI'];
function __construct($value){
    if(strpos($value,'/')==FALSE){
        return trim(substr(strrchr($value, ' '), 1 ));
    }else{
        return trim(substr($value, strpos($value,'/')),'/');
    }

    $value = ucwords($value);
}
?&gt;
</code></pre>

<p>This doesn't strip any slashes and is pretty sloppy code. Any help would be greatly appreciated. </p>
