Retrieve Link ID
<p>Let say we have link as following</p>

<p>for link as <code>****.com/index.php?id=4</code> </p>

<p>the <code>&lt;?=$id?&gt;</code> is 4</p>

<p>for link as <code>****.com/4</code></p>

<p>the <code>&lt;?=$id?&gt;</code> is 4</p>

<p>for link as <code>****.com/4-keyowrd-keyword</code></p>

<pre><code>$realid = array_shift(explode("-", $id));
</code></pre>

<p>so <code>&lt;?=$realid?&gt;</code> is 4</p>

<p><strong>Now my question</strong> is for link as <code>****.com/4/keyword-keyword</code></p>

<p>How then get the id as 4 is there any way to do it ?</p>

<p>Thanks</p>
