I have a telephone verification system in place. This allows the customer to enter a phone number. However, how can I remove all 0
's from the start of the string?
For example I could use substr
to remove one or two 0
's but what if the customer enters ten or twelve of them?
i.e The customer could enter one of the following numbers:
- 077223704750
- 0077223704750
- 00000077223704750
- 0000000000077223704750`
How can I remove all 0
's from the start only, not from the rest of the string?