This will take a '0' off the front of a number. I don't know if thats exactly what you're looking for, but give it a shot.
$a = "08";
echo "<br>>> $a";
$a = ereg_replace("0([0-9]+)", "\\\\1", $a);
echo "<br>>> $a";
$b = "0842";
echo "<br>>> $b";
$b = ereg_replace("0([0-9]+)", "\\\\1", $b);
echo "<br>>> $b";
Hope this helps.