Posted By

nicolaspar on 05/10/07


Tagged

zero add Left cero izquierda agregar


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

luman


PHP - Ceros a la izquierda


 / Published in: PHP
 

  1. function ceros($numero, $ceros=2){
  2. return sprintf("%0".$ceros."s", $numero );
  3. }
  4.  
  5. echo ceros(2, 5); #out 000002

Report this snippet  

You need to login to post a comment.