Use this code to convert any number, for example 1234 is a number and you want it into 10 digit number by add "0" before this number automatically. Then following code will convert it into "0000001234" in string form.

Code:

Interger Number: <?php 

    echo $any_int=1234; echo "<br/>";

    echo $str = (string)$any_int;echo "<br/>";

    echo $u_char= strlen($str);echo "<br/>";

    $any_int_10char="";

    for($a=0;$a<(10-$u_char);$a++){

        $any_int_10char=$any_int_10char."0";

    }

    echo $any_int_10char;

?>