I have this code:
$cid = intval(substr($gid, 3, 6));
If $gid = "002000001" then it works fine and I get $cid=1. But if $gid="0020004BC" then the letters seem to confuse it and I get $cid=4.
How can I fix this? Is it something to do with intval?
Thanks,
Jon