1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help me to make a code

Discussion in 'Web Design' started by brianadams90, May 20, 2012.

  1. brianadams90

    brianadams90 Newbie

    Joined:
    Apr 16, 2012
    Messages:
    28
    Likes Received:
    0
    Hey..

    Well i need a simple code.. Or i am not sure is that simple :)

    I need a code what says example "Total paid 1340,00 dollars paid out" and the number needs to rise up all the time.. Like 0,50$ every minute.

    Thank you!
    :cool:
     
  2. Elliott1992

    Elliott1992 Junior Member

    Joined:
    Apr 16, 2011
    Messages:
    163
    Likes Received:
    30
    I'll make it if you pay me...
     
  3. brianadams90

    brianadams90 Newbie

    Joined:
    Apr 16, 2012
    Messages:
    28
    Likes Received:
    0
    I can give you website visitors if you make it.
     
  4. rendesr

    rendesr Junior Member

    Joined:
    Jan 15, 2012
    Messages:
    122
    Likes Received:
    95
    Here you go, please use the THANKS button bro...

    PHP:
    <?php

    // starting level
    $startingLevel 1340 

    // increment amount (every minute)
    $increment 0.5 ;

    $currentAmount number_format ($startingLevel + (time() - 1337516434)/60 $increment2) ;

    echo 
    "Total paid ".  $currentAmount " dollars paid out";

    ?>
     
    • Thanks Thanks x 1
  5. brianadams90

    brianadams90 Newbie

    Joined:
    Apr 16, 2012
    Messages:
    28
    Likes Received:
    0
    After i add your code, it says.
    Parse error: syntax error, unexpected '<' in /home/e180/public_html/inc/classes/BxDolPageView.php(607) : eval()'d code on line 1
     
  6. rendesr

    rendesr Junior Member

    Joined:
    Jan 15, 2012
    Messages:
    122
    Likes Received:
    95
    If you are entering it in an existing PHP file, or a file that is being included into a PHP file you don't need the opening and closing tags.
    Remove the following lines:
    PHP:
    <?php
    and
    PHP:
    ?>
     
    • Thanks Thanks x 1
  7. brianadams90

    brianadams90 Newbie

    Joined:
    Apr 16, 2012
    Messages:
    28
    Likes Received:
    0
    One more thing. "Center code and <p> code doesnt work"

    See it here social-bombers (DOOOTT )))) COOOOM

    How to add a center code?
     
  8. rendesr

    rendesr Junior Member

    Joined:
    Jan 15, 2012
    Messages:
    122
    Likes Received:
    95
    Something like this mate, should work for you:

    PHP:
    // starting level
    $startingLevel 1340 

    // increment amount (every minute)
    $increment 0.5 ;

    $currentAmount number_format ($startingLevel + (time() - 1337516434)/60 $increment2) ;

    echo 
    '<p style="text-align: center">Total paid '.  $currentAmount ' dollars paid out</p>';
     
    • Thanks Thanks x 1
  9. brianadams90

    brianadams90 Newbie

    Joined:
    Apr 16, 2012
    Messages:
    28
    Likes Received:
    0
    Sorry for brothering you for so much :) One more thing.. How to <b>Amount</b> Tried but only broked the code :D
     
  10. rendesr

    rendesr Junior Member

    Joined:
    Jan 15, 2012
    Messages:
    122
    Likes Received:
    95
    No worries, hope you get it working. To bold the amount, do it like this..

    PHP:
    // starting level
    $startingLevel 1340 

    // increment amount (every minute)
    $increment 0.5 ;

    $currentAmount number_format ($startingLevel + (time() - 1337516434)/60 $increment2) ;

    echo 
    '<p style="text-align: center">Total paid <b>'.  $currentAmount '</b> dollars paid out</p>';