How to remove leading zeros from a string
I am trying to extract a part of the string 0044800 999999 at the first occurrence of a non-zero. I am using preg_split() thus:
$str = preg_split("/[1-9]/", "0044800 999999", 2);
var_dump($str[1]);
The problem is that when this operation completes, it also removes the matching non-zero digit. E.g.
0044800 999999 results in 4800 999999 instead of 44800 999999.
What could I be doing wrong?