note 17734 added to function.floor

From: Date: Fri, 21 Dec 2001 11:39:29 +0000
Subject: note 17734 added to function.floor
Groups: php.notes 
Request: Send a blank email to php-notes+get-23745@lists.php.net to get a copy of this message
How about a second parameter to the function called Decimals? Say I need a percentage of something and I'd like to have the output using two decimals. Usually you'd first multiply the percentage value with 100, then divide it by 100 after the floor()/round()/ceil() .. this would make our code a few lines shorter, also more comprehensive, than doing this lame work-around for the decimals. -- http://www.php.net/manual/en/function.floor.php http://master.php.net/manage/user-notes.php?action=edit+17734 http://master.php.net/manage/user-notes.php?action=delete+17734 http://master.php.net/manage/user-notes.php?action=reject+17734

« previous php.notes (#23745) next »