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

mod rewrite - Doing external redirect. .htaccess NS flag not working. How to achieve similar results? -

mysql - How to insert just year and month into date field? -