Announcement

Collapse
No announcement yet.

[Quick Question] Rounding down

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

  • [Quick Question] Rounding down

    Say i did an equation and got an answer:
    36.36363636363636
    And i would like it to be formatted and show: 36.36 (to 2 decimal places.)
    Is there a function or method to do this?

    Thanks alot in advance.

    Ryan

  • #2
    PHP Code:
    $num "36.36363636363636 ";
    round($num,2); 
    You can find out more at
    http://www.php.net/round

    Comment


    • #3
      Originally posted by menator
      PHP Code:
      $num "36.36363636363636 ";
      round($num,2); 
      You can find out more at
      http://www.php.net/round
      Worked great.
      Thanks alot for the quick reply menator!

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X