Hey,

array_shift seems to work on another server, but it does not on mine.

The code is the following;

PHP Code:
$realid array_shift(explode("-"$id)); 
What I am trying to get done is the following;

I have a URL, which is like [ example.com/48555-animal-name.html ]. How is it possible to ONLY get the ID which is 48555, to call an entry from the database?

PHP Code:
$realid array_shift(explode("-"$id));
$qryrec="select * from animals where id='$realid'";
$resultrec=mysql_query($qryrec) or die($qryrec);
$linerec=mysql_fetch_array($resultrec);
$pcommon ucwords($linerec[common]); 
Is there an another way of doing this, without using array_shift?

Thanks,