title: How can I take an id from the url in php and use it like a number?
body: <p>I have a url that will look as follows.</p>
  
  <pre><code>post/:id
  </code></pre>
  
  <p>I am exploding the <code>$_SERVER['REQUEST_URI']</code>;</p>
  
  <p>and I need to make the <code>$uri[2]</code> is numerical so I can do things like</p>
  
  <p><code>$next = $uri[2]++;</code></p>
  
  <p>I have tried <code>is_numeric</code> but of course the <code>request_uri</code> is a string (broken into an array of strings).</p>
  
  <p>Can I type cast in php to integer?</p>