Posted By

on 10/26/09


Tagged


Versions (?)

Leading zero on single digit numbers


 / Published in: PHP
 

URL: http://web-development-blog.co.uk/2009/09/27/leading-zero-on-single-digit-numbers-php/

Ni idea de que o como salio pero si tu variable es un numero menor a 10 le pondrĂ¡ un 0 (cero) antes, ejm: 01 , 02, 03...09

  1. sprintf("%02d", $variable);

Report this snippet  

You need to login to post a comment.