Format number with zeros

Add leading zeros to format number.

php
fork add to bundle source
function zero_format($number, $width = 6) { return str_pad($number, $width, '0', STR_PAD_LEFT); }

usage

load_function('zero_format'); echo zero_format(234); // 000234
← how to use this in app?
create log ...inout