RE: [PHP] [S.O.S.] round() problem

From: Date: Sat, 17 Feb 2001 16:30:40 +0000
Subject: RE: [PHP] [S.O.S.] round() problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40356@lists.php.net to get a copy of this message
Sumarlidi, I have come across this same problem with earlier versions of PHP3. There are versions of PHP3 that do not have the extra parameter. I have 3.0.12 on one of my machines and it doesn't work. You will have to manually calculate your precision using something like: round(100*number)/100 or function my_rounder($value) { $buffer = $value * 100; $rounded = round($buffer); $buffer = $rounded / 100; return $buffer; } Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: rcovell@rolet.com Phone: 816.210.7145 Fax: 816.753.1952 -----Original Message----- From: SED [mailto:sed@sed.is] Sent: Friday, February 16, 2001 7:32 PM To: php-general@lists.php.net Subject: [PHP] [S.O.S.] round() problem I have been writing this project in PHP4 but had to save it for PHP3 an apache server. http://www.sed.is/sereign_145.php3 When I saved it on an apache server (I have W2K - where it's 100% ok!) as php3 I get these errors: Warning: Wrong parameter count for round() in <sniped>/sereign_145.php3 on line 152 Warning: Wrong parameter count for round() in <sniped>/sereign_145.php3 on line 161 According to the manuals this function should work like in both PHP3 and 4... Can anyone point me to a solution? Regards, Sumarlidi Einar Dadason SED - Graphic Design ------------------------------------------ Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: sed@sed.is Homepage: www.sed.is <- New Homepage! ------------------------------------------ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#40356) next »