Posted By

plasticated on 09/03/08


php number textmate Pad digit

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


PHP: Pad single digit number to 2.

 / Published in: PHP

  1. $padded_num = str_pad($num, 2, 0, STR_PAD_LEFT);

Report this snippet  

You need to login to post a comment.