我有一个只包含数字的字符串。现在我想从该字符串中删除所有前导 0
例如:
input: 000000001230
output: 1230
input: 01000
output: 1000
在 PHP/Zend 中有这方面的功能吗?
谢谢
最佳答案
$myvar = ltrim('01000','0');
关于php - Zend/PHP : How to remove all leading 0s from string?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2636620/