[HELP] Adding in reverse ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [HELP] Adding in reverse ?

    Hellow There !!

    I'm trying to build a function which counts in reverse :

    for example i want to count from 000000000​1 in the following order

    000000000​1 // 000000000​2 // 000000000​3 etc

    the problem is on the big numbers because it needs to substitute one zero and start adding on it .

    like so :
    000000001​1 / eleven
    0000000200 / two hundred

    increment untill it reaches to
    9999999999

    any idea of how doing that ? , i'm not requesting full code , just "ideas" / "ways" to do it .

    Thanks .
    Last edited by just_m3.; 09.10.14, 12:56.
    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain

    And a hundred percent reason to remember the name!

    #2
    Whew Done it , enjoy the "code" ;

    PHP Code:

    for($source=1$source<=1000000000$source++)
    {

    if(
    strlen($source) == ) {  $prefix "000000000"; } 
    if(
    strlen($source) == ) {  $prefix "00000000"; } 
    if(
    strlen($source) == ) {  $prefix "0000000"; } 
    if(
    strlen($source) == ) {  $prefix "000000"; } 
    if(
    strlen($source) == ) {  $prefix "00000"; } 
    if(
    strlen($source) == ) {  $prefix "0000"; } 
    if(
    strlen($source) == ) {  $prefix "000"; } 
    if(
    strlen($source) == ) {  $prefix "00"; } 
    if(
    strlen($source) == ) {  $prefix "0"; } 
    if(
    strlen($source) == 10 ) {  $prefix ""; } 

    echo 
    $prefix.$source."<br/>";




    Last edited by just_m3.; 09.10.14, 14:51.
    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain

    And a hundred percent reason to remember the name!

    Comment

    Working...
    X