Posted By

alli14404 on 11/11/08


Tagged

trim String zero leading


Versions (?)

Remove leading zero's from a string


 / Published in: PHP
 

  1. <?php
  2.  
  3. $str = "00001030";
  4.  
  5. print ltrim($str, "0"); // left trim the '0' character from string
  6.  
  7. ?>

Report this snippet  

You need to login to post a comment.