I wonder if they disabled array_shift
in > PHP 5.2.6
$realid = array_shift(explode("-", $id));
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.
If so, is there anyway I can do the following:
For a URL like this 87262-any-thing-here.html
how can I get only the number, 87262
, so that I will use it to call any entry from database:
$qryrec="select * from mytable where id='$realid'";
$resultrec=mysql_query($qryrec) or die($qryrec);
$linerec=mysql_fetch_array($resultrec);
Is there any way to do the same without array_shift
?