Skip to content
  • English
    • Greek
Call us now! +44 (0) 2037347158
WPCS 1.1.7
SBZ Systems
  • Software
  • eCommerce
  • Support
    • EMDI
    • General issues
    • Remote
    • Client area
  • Company
    • News
    • Partners
    • Quality Management
    • Contact
Search

More results...

Generic filters
  • Software
  • eCommerce
  • Support
    • EMDI
    • General issues
    • Remote
    • Client area
  • Company
    • News
    • Partners
    • Quality Management
    • Contact
Search

More results...

Generic filters

Decimal Round Up (PHP)

  • Post published:11/11/2021
  • Post category:Free source (Delphi, PHP, Perl)

To round decimals upwards:

PHP
1
2
3
4
function round_up ( $value, $precision ) {
$pow = pow ( 10, $precision );
return ( ceil ( $pow * $value ) + ceil ( $pow * $value - ceil ( $pow * $value ) ) ) / $pow;
}

For example:

1
echo round_up(100.243421,2)

gives the result

1
100.25

 

Source: https://stackoverflow.com/questions/8239600/rounding-up-to-the-second-decimal-place

 

 

 

Categories
  • Android development
  • Asterisk (Issabel, FreePBX, Elastix, Trixbox)
  • Databases issues and tips
  • Firebird
  • Free applications
  • Free source (Delphi, PHP, Perl)
  • Linux general issues
  • OpenOffice / LibreOffice / Microsoft Office
  • Third party usefull software
  • Useful attachments in Word format
  • Web development
  • Windows general issues
Latest
  • Decimal Round Up (PHP)
  • Changing RSS feed url on WordPress
  • Convert tables from innodb to MyISAM – WordPress
  • Programmatically selecting a TTreeView node by index – Delphi
  • Field appearance under certain conditions and line change – FastReport
  • Opencart 2.2.0.0 SSL & SEO issue fix
  • Assign OnKeyDown event on TAdvDBFormPanel (Delphi)
  • Opencart 2.2 redirect issue
  • .htaccess error: Option All not allowed here
  • Error pagination page={page} in SEO (Opencart)

SBZ SYSTEMS

20 Iasonidou Str. (1st floor)
16777 Elliniko, Athens, Greece
Tel.: +30 2118002930
272 Bath Street, G2 4JR
Glasgow, United Kingdom
Τel.: +44 (0) 2037347158

SUPPORT

  • EMDI
  • General
  • Remote
  • Client Area

COMPANY

  • About
  • News
  • Quality Management
  • Contact

OTHER

  • Sitemap
  • Jobs
  • Payment policy
  • Terms & Conditions
                   

Copyright © 2022 - SBZ Systems