php - How to remove all leading zeroes in a string -


if have string

00020300504 00000234892839 000239074 

how can rid of leading zeroes have this

20300504 234892839 239074 

note number above generated randomly.

ltrim:

$str = ltrim($str, '0'); 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -