Does array_shift and explode work?
<p>I wonder if they disabled <code>array_shift</code> in  > PHP 5.2.6</p>

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

<p>Because this code was working fine on my server PHP Version 5.2.6, while is not working in another server with higher PHP version.</p>

<p>If so, is there anyway I can do the following:</p>

<p>For a URL like this <code>87262-any-thing-here.html</code> how can I get only the number, <code>87262</code>, so that I will use it to call any entry from database:</p>

<pre><code>$qryrec="select * from mytable where id='$realid'";
$resultrec=mysql_query($qryrec) or die($qryrec);
$linerec=mysql_fetch_array($resultrec);
</code></pre>

<p>Is there any way to do the same without <code>array_shift</code>?</p>
