Help me to make a code

brianadams90

Newbie
Joined
Apr 16, 2012
Messages
28
Reaction score
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:
 
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 * $increment, 2) ;

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

?>
 
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 * $increment, 2) ;

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

?>

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
 
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:
?>
 
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:
?>

One more thing. "Center code and <p> code doesnt work"

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

How to add a center code?
 
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 * $increment, 2) ;

echo '<p style="text-align: center">Total paid '.  $currentAmount . ' dollars paid out</p>';
 
Sorry for brothering you for so much :) One more thing.. How to <b>Amount</b> Tried but only broked the code :D
 
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 * $increment, 2) ;

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