Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2.    
  3.     $tot = array();
  4.    
  5.     $tot[] = 0.85;
  6.     $tot[] = 0.85;
  7.     $tot[] = 0.85;
  8.     $tot[] = 0.85;
  9.     $tot[] = 0.85;
  10.     $tot[] = 0.85;
  11.     $tot[] = 0.85;
  12.     $tot[] = 0.85;
  13.     $tot[] = 0.85;
  14.     $tot[] = 0.85;
  15.     $tot[] = 0.85;
  16.     $tot[] = 0.85;
  17.     $tot[] = 0.85;
  18.     $tot[] = 0.85;
  19.     $tot[] = 0.85;
  20.     $tot[] = 0.85;
  21.     $tot[] = 0.85;
  22.     $tot[] = 0.85;
  23.     $tot[] = 0.85;
  24.     $tot[] = 0.425;
  25.     $tot[] = 0.425;
  26.  
  27.     foreach( $tot as $chave=>$value )
  28.         $avl += $value;
  29.  
  30.     echo $avl . "<br />";
  31.     echo number_format($avl, 50, ",", ".") . "<br />";
  32.     echo number_format(array_sum($tot), 50, ",", ".");
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement