Formatting A Number With Leading Zeros


function digit($nom, $digit){
        $num = sprintf("%0" . $digit ."s", $nom);
        return $num;
}

How to call

$string = $this->digit(50,5); //return 00050
Comment / Response

Your Comment / Response